Changeset 23742
- Timestamp:
- 03/18/2013 05:24:24 PM (12 years ago)
- Location:
- trunk/wp-admin/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-posts-list-table.php
r23681 r23742 1033 1033 1034 1034 </div> 1035 1036 <?php if ( post_type_supports( $screen->post_type, 'post-formats' ) && current_theme_supports( 'post-formats' ) ) :1037 $post_formats = get_theme_support( 'post-formats' );1038 if ( isset( $post_formats[0] ) && is_array( $post_formats[0] ) ) :1039 $all_post_formats = get_post_format_strings();1040 unset( $all_post_formats['standard'] ); ?>1041 <div class="inline-edit-group">1042 <label class="alignleft" for="post_format">1043 <span class="title"><?php _ex( 'Format', 'post format' ); ?></span>1044 <select name="post_format">1045 <?php if ( $bulk ) : ?>1046 <option value="-1"><?php _e( '— No Change —' ); ?></option>1047 <?php endif; ?>1048 <option value="0"><?php _ex( 'Standard', 'Post format' ); ?></option>1049 <?php foreach ( $all_post_formats as $slug => $format ) :1050 $unsupported = ! in_array( $slug, $post_formats[0] );1051 if ( $bulk && $unsupported )1052 continue;1053 ?>1054 <option value="<?php echo esc_attr( $slug ); ?>"<?php if ( $unsupported ) echo ' class="unsupported"'; ?>><?php echo esc_html( $format ); ?></option>1055 <?php endforeach; ?>1056 </select></label>1057 </div>1058 <?php endif; ?>1059 <?php endif; // post-formats ?>1060 1061 1035 </div></fieldset> 1062 1036 -
trunk/wp-admin/includes/post.php
r23735 r23742 353 353 } 354 354 355 if ( isset( $post_data['post_format'] ) ) {356 if ( '0' == $post_data['post_format'] )357 $post_data['post_format'] = false;358 // don't change the post format if it's not supported or not '0' (standard)359 elseif ( ! current_theme_supports( 'post-formats', $post_data['post_format'] ) )360 unset( $post_data['post_format'] );361 }362 363 355 $updated = $skipped = $locked = array(); 364 356 foreach ( $post_IDs as $post_ID ) { … … 410 402 unstick_post( $post_ID ); 411 403 } 412 413 if ( isset( $post_data['post_format'] ) )414 set_post_format( $post_ID, $post_data['post_format'] );415 404 } 416 405
Note: See TracChangeset
for help on using the changeset viewer.