mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 15:16:59 +00:00
New design of Quick/Bulk Edit (added some colors and IE fixes), props mdawaffe, see #8144
git-svn-id: https://develop.svn.wordpress.org/trunk@9604 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -215,7 +215,7 @@ function bulk_edit_posts( $post_data = null ) {
|
||||
|
||||
$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' );
|
||||
$reset = array( 'post_author', 'post_status', 'post_password', 'post_parent', 'page_template', 'comment_status', 'ping_status', 'keep_private', 'tags_input', 'post_category', 'sticky' );
|
||||
foreach ( $reset as $field ) {
|
||||
if ( isset($post_data[$field]) && ( '' == $post_data[$field] || -1 == $post_data[$field] ) )
|
||||
unset($post_data[$field]);
|
||||
@@ -274,6 +274,14 @@ 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 ( 'sticky' == $post_data['sticky'] )
|
||||
stick_post( $post_ID );
|
||||
else
|
||||
unstick_post( $post_ID );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return array( 'updated' => $updated, 'skipped' => $skipped, 'locked' => $locked );
|
||||
|
||||
Reference in New Issue
Block a user