if ( !
$thumbnail_support && 'attachment' ===
$post_type &&
$post->post_mime_type
) { if ( wp_attachment_is( 'audio',
$post ) ) { $thumbnail_support =
post_type_supports( 'attachment:audio', 'thumbnail'
) ||
current_theme_supports( 'post-thumbnails', 'attachment:audio'
);
} elseif ( wp_attachment_is( 'video',
$post ) ) { $thumbnail_support =
post_type_supports( 'attachment:video', 'thumbnail'
) ||
current_theme_supports( 'post-thumbnails', 'attachment:video'
);
} } $publish_callback_args = array
( '__back_compat_meta_box' => true
);
if ( post_type_supports( $post_type, 'revisions'
) && 'auto-draft' !==
$post->post_status
) { $revisions =
wp_get_latest_revision_id_and_total_count( $post->ID
);
// We should aim to show the revisions meta box only when there are revisions.
if ( !
is_wp_error( $revisions ) &&
$revisions['count'
] > 1
) { $publish_callback_args = array
( 'revisions_count' =>
$revisions['count'
],
'revision_id' =>
$revisions['latest_id'
],
'__back_compat_meta_box' => true,
);
add_meta_box( 'revisionsdiv',
__( 'Revisions'
), 'post_revisions_meta_box', null, 'normal', 'core', array
( '__back_compat_meta_box' => true
) );
} }