mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-04 12:01:40 +00:00
Fix bulk edit, some cleanup and message fixes for moving in/out of the trash, see #4529
git-svn-id: https://develop.svn.wordpress.org/trunk@11807 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -236,6 +236,14 @@ function bulk_edit_posts( $post_data = null ) {
|
||||
wp_die( __('You are not allowed to edit posts.') );
|
||||
}
|
||||
|
||||
if ( -1 == $post_data['_status'] ) {
|
||||
$post_data['post_status'] = null;
|
||||
unset($post_data['post_status']);
|
||||
} else {
|
||||
$post_data['post_status'] = $post_data['_status'];
|
||||
}
|
||||
unset($post_data['_status']);
|
||||
|
||||
$post_IDs = array_map( 'intval', (array) $post_data['post'] );
|
||||
|
||||
$reset = array( 'post_author', 'post_status', 'post_password', 'post_parent', 'page_template', 'comment_status', 'ping_status', 'keep_private', 'tags_input', 'post_category', 'sticky' );
|
||||
@@ -298,7 +306,7 @@ function bulk_edit_posts( $post_data = null ) {
|
||||
$post_data['ID'] = $post_ID;
|
||||
$updated[] = wp_update_post( $post_data );
|
||||
|
||||
if ( current_user_can( 'edit_others_posts' ) && isset( $post_data['sticky'] ) ) {
|
||||
if ( isset( $post_data['sticky'] ) && current_user_can( 'edit_others_posts' ) ) {
|
||||
if ( 'sticky' == $post_data['sticky'] )
|
||||
stick_post( $post_ID );
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user