When editing a plain, legacy [gallery] shortcode, ensure we are sorting its contents using menu_order.

When attachments are sorted, we convert the shortcode to [gallery ids=""], as before.

props koopersmith.
fixes #22608.



git-svn-id: https://develop.svn.wordpress.org/trunk@22882 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2012-11-27 23:20:12 +00:00
parent 7ecac8a876
commit da9ff4451d
4 changed files with 52 additions and 19 deletions
+2 -1
View File
@@ -1254,7 +1254,7 @@ function wp_plupload_default_settings() {
'multipart' => true,
'urlstream_upload' => true,
);
// Multi-file uploading doesn't currently work in iOS Safari,
// single-file allows the built-in camera to be used as source for images
if ( wp_is_mobile() )
@@ -1327,6 +1327,7 @@ function wp_prepare_attachment_for_js( $attachment ) {
'uploadedTo' => $attachment->post_parent,
'date' => strtotime( $attachment->post_date_gmt ) * 1000,
'modified' => strtotime( $attachment->post_modified_gmt ) * 1000,
'menuOrder' => $attachment->menu_order,
'mime' => $attachment->post_mime_type,
'type' => $type,
'subtype' => $subtype,