Permalink
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...
1 parent 5a3c968 commit 5d980a8e8e2566bdde2d79b0e3819d965dda2553 @nacin nacin committed Jan 5, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 wp-admin/includes/media.php
View
3 wp-admin/includes/media.php
@@ -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,

0 comments on commit 5d980a8

Please sign in to comment.