Make WordPress Core


Ignore:
Timestamp:
03/18/2013 05:24:24 PM (12 years ago)
Author:
ryan
Message:

Don't allow changing the post format from quick edit and bulk edit. These do not have sufficient context to set the post format.

Props kovshenin
fixes #23426

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-posts-list-table.php

    r23681 r23742  
    10331033
    10341034            </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( '&mdash; No Change &mdash;' ); ?></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 
    10611035        </div></fieldset>
    10621036
Note: See TracChangeset for help on using the changeset viewer.