Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Whenever we have compat fields to render, send a dummy menu_order fie…

…ld (which was always sent in 3.4) to ensure an unchecked checkbox can still be processed by attachment_fields_to_save. fixes #22868.

git-svn-id: http://core.svn.wordpress.org/trunk@23290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit 5d980a8e8e2566bdde2d79b0e3819d965dda2553 1 parent 5a3c968
Andrew Nacin nacin authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  wp-admin/includes/media.php
3  wp-admin/includes/media.php
View
@@ -1417,6 +1417,9 @@ function get_compat_media_markup( $attachment_id, $args = null ) {
$item .= '<input type="hidden" name="' . esc_attr( $hidden_field ) . '" value="' . esc_attr( $value ) . '" />' . "\n";
}
+ if ( $item )
+ $item = '<input type="hidden" name="attachments[' . $attachment_id . '][menu_order]" value="' . esc_attr( $post->menu_order ) . '" />' . $item;
+
return array(
'item' => $item,
'meta' => $media_meta,
Please sign in to comment.
Something went wrong with that request. Please try again.