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. fixes #22868.

git-svn-id: https://develop.svn.wordpress.org/trunk@23290 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-01-05 03:50:28 +00:00
parent ae63b07abd
commit fcbb71ad77
1 changed files with 3 additions and 0 deletions

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,