Make WordPress Core

Ticket #23426: 23426.diff

File 23426.diff, 2.5 KB (added by kovshenin, 12 years ago)
  • wp-admin/includes/class-wp-posts-list-table.php

     
    10261026        <?php endif; // 'post' && $can_publish && current_user_can( 'edit_others_cap' ) ?>
    10271027
    10281028                        </div>
    1029 
    1030         <?php if ( post_type_supports( $screen->post_type, 'post-formats' ) && current_theme_supports( 'post-formats' ) ) :
    1031                 $post_formats = get_theme_support( 'post-formats' );
    1032                 if ( isset( $post_formats[0] ) && is_array( $post_formats[0] ) ) :
    1033                         $all_post_formats = get_post_format_strings();
    1034                         unset( $all_post_formats['standard'] ); ?>
    1035                         <div class="inline-edit-group">
    1036                                 <label class="alignleft" for="post_format">
    1037                                 <span class="title"><?php _ex( 'Format', 'post format' ); ?></span>
    1038                                 <select name="post_format">
    1039                                 <?php if ( $bulk ) : ?>
    1040                                         <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
    1041                                 <?php endif; ?>
    1042                                         <option value="0"><?php _ex( 'Standard', 'Post format' ); ?></option>
    1043                                 <?php foreach ( $all_post_formats as $slug => $format ) :
    1044                                         $unsupported = ! in_array( $slug, $post_formats[0] );
    1045                                         if ( $bulk && $unsupported )
    1046                                                 continue;
    1047                                         ?>
    1048                                         <option value="<?php echo esc_attr( $slug ); ?>"<?php if ( $unsupported ) echo ' class="unsupported"'; ?>><?php echo esc_html( $format ); ?></option>
    1049                                 <?php endforeach; ?>
    1050                                 </select></label>
    1051                         </div>
    1052                 <?php endif; ?>
    1053         <?php endif; // post-formats ?>
    1054 
    10551029                </div></fieldset>
    10561030
    10571031        <?php
  • wp-admin/includes/post.php

     
    344344                }
    345345        }
    346346
    347         if ( isset( $post_data['post_format'] ) ) {
    348                 if ( '0' == $post_data['post_format'] )
    349                         $post_data['post_format'] = false;
    350                 // don't change the post format if it's not supported or not '0' (standard)
    351                 elseif ( ! current_theme_supports( 'post-formats', $post_data['post_format'] ) )
    352                         unset( $post_data['post_format'] );
    353         }
    354 
    355347        $updated = $skipped = $locked = array();
    356348        foreach ( $post_IDs as $post_ID ) {
    357349                $post_type_object = get_post_type_object( get_post_type( $post_ID ) );
     
    401393                        else
    402394                                unstick_post( $post_ID );
    403395                }
    404 
    405                 if ( isset( $post_data['post_format'] ) )
    406                         set_post_format( $post_ID, $post_data['post_format'] );
    407396        }
    408397
    409398        return array( 'updated' => $updated, 'skipped' => $skipped, 'locked' => $locked );