mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Don't allow changing the post format from quick edit and bulk edit. These do not have sufficient context to set the post format.
Props kovshenin fixes #23426 git-svn-id: https://develop.svn.wordpress.org/trunk@23742 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -352,14 +352,6 @@ function bulk_edit_posts( $post_data = null ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $post_data['post_format'] ) ) {
|
||||
if ( '0' == $post_data['post_format'] )
|
||||
$post_data['post_format'] = false;
|
||||
// don't change the post format if it's not supported or not '0' (standard)
|
||||
elseif ( ! current_theme_supports( 'post-formats', $post_data['post_format'] ) )
|
||||
unset( $post_data['post_format'] );
|
||||
}
|
||||
|
||||
$updated = $skipped = $locked = array();
|
||||
foreach ( $post_IDs as $post_ID ) {
|
||||
$post_type_object = get_post_type_object( get_post_type( $post_ID ) );
|
||||
@@ -409,9 +401,6 @@ function bulk_edit_posts( $post_data = null ) {
|
||||
else
|
||||
unstick_post( $post_ID );
|
||||
}
|
||||
|
||||
if ( isset( $post_data['post_format'] ) )
|
||||
set_post_format( $post_ID, $post_data['post_format'] );
|
||||
}
|
||||
|
||||
return array( 'updated' => $updated, 'skipped' => $skipped, 'locked' => $locked );
|
||||
|
||||
Reference in New Issue
Block a user