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:
Andrew Ozz
2008-11-11 02:58:24 +00:00
parent b833c35a24
commit 1edadef5b8
10 changed files with 563 additions and 441 deletions
+9 -1
View File
@@ -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 );