Whenever we have compat fields to render, send a dummy menu_order field (which was always sent in 3.4) to ensure an unchecked checkbox can still be processed by attachment_fields_to_save.

Merges [23290] to the 3.5 branch.
fixes #22868.



git-svn-id: http://core.svn.wordpress.org/branches/3.5@23291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-01-05 04:00:18 +00:00
parent b29fa0b746
commit 7fa6457c31

View File

@ -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,