Ticket #24096: 24096.2.diff
File 24096.2.diff, 2.5 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/class-wp-posts-list-table.php
1025 1025 <?php endif; // 'post' && $can_publish && current_user_can( 'edit_others_cap' ) ?> 1026 1026 1027 1027 </div> 1028 1029 <?php if ( $bulk ) : // post formats bulk edit 1030 $all_post_formats = get_post_format_strings(); 1031 unset( $all_post_formats['standard'] ); 1032 ?> 1033 <div class="inline-edit-group"> 1034 <label class="alignleft" for="post_format"> 1035 <span class="title"><?php _ex( 'Format', 'post format' ); ?></span> 1036 <select name="post_format"> 1037 <option value="-1"><?php _e( '— No Change —' ); ?></option> 1038 <option value="0"><?php _ex( 'Standard', 'Post format' ); ?></option> 1039 <?php foreach ( $all_post_formats as $slug => $format ) : ?> 1040 <option value="<?php echo esc_attr( $slug ); ?>"><?php echo esc_html( $format ); ?></option> 1041 <?php endforeach; ?> 1042 </select></label> 1043 </div> 1044 <?php endif; // $bulk ?> 1045 1028 1046 </div></fieldset> 1029 1047 1030 1048 <?php -
wp-admin/includes/post.php
314 314 315 315 $post_IDs = array_map( 'intval', (array) $post_data['post'] ); 316 316 317 $reset = array( 'post_author', 'post_status', 'post_password', 'post_parent', 'page_template', 'comment_status', 'ping_status', 'keep_private', 'tax_input', 'post_category', 'sticky' ); 317 $reset = array( 318 'post_author', 'post_status', 'post_password', 319 'post_parent', 'page_template', 'comment_status', 320 'ping_status', 'keep_private', 'tax_input', 321 'post_category', 'sticky', 'post_format' 322 ); 323 318 324 foreach ( $reset as $field ) { 319 325 if ( isset($post_data[$field]) && ( '' == $post_data[$field] || -1 == $post_data[$field] ) ) 320 326 unset($post_data[$field]); … … 359 365 } 360 366 } 361 367 368 if ( isset( $post_data['post_format'] ) && '0' == $post_data['post_format'] ) 369 $post_data['post_format'] = false; 370 362 371 $updated = $skipped = $locked = array(); 363 372 foreach ( $post_IDs as $post_ID ) { 364 373 $post_type_object = get_post_type_object( get_post_type( $post_ID ) ); … … 408 417 else 409 418 unstick_post( $post_ID ); 410 419 } 420 421 if ( isset( $post_data['post_format'] ) ) 422 set_post_format( $post_ID, $post_data['post_format'] ); 411 423 } 412 424 413 425 return array( 'updated' => $updated, 'skipped' => $skipped, 'locked' => $locked );