Make WordPress Core


Ignore:
Timestamp:
01/12/2019 06:40:16 AM (8 years ago)
Author:
pento
Message:

Coding Standards: Upgrade WPCS to 1.2.1.

This upgrade fixes quite a few false positives, as well as auto-fixing some indenting issues.

Fixes #45956.

File:
1 edited

Legend:

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

    r44221 r44574  
    14721472                        </label>
    14731473
    1474                 <?php if ( is_post_type_viewable( $screen->post_type ) ) : // is_post_type_viewable check ?>
     1474                                <?php if ( is_post_type_viewable( $screen->post_type ) ) : // is_post_type_viewable check ?>
    14751475
    14761476                        <label>
     
    14791479                        </label>
    14801480
    1481                         <?php
     1481                                        <?php
    14821482        endif; // is_post_type_viewable check
    14831483        endif; // $bulk
     
    14941494        endif; // $bulk
    14951495
    1496 if ( post_type_supports( $screen->post_type, 'author' ) ) :
    1497         $authors_dropdown = '';
    1498 
    1499         if ( current_user_can( $post_type_object->cap->edit_others_posts ) ) :
    1500                 $users_opt = array(
    1501                         'hide_if_only_one_author' => false,
    1502                         'who'                     => 'authors',
    1503                         'name'                    => 'post_author',
    1504                         'class'                   => 'authors',
    1505                         'multi'                   => 1,
    1506                         'echo'                    => 0,
    1507                         'show'                    => 'display_name_with_login',
    1508                 );
    1509                 if ( $bulk ) {
    1510                         $users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' );
    1511                 }
    1512 
    1513                 if ( $authors = wp_dropdown_users( $users_opt ) ) :
    1514                         $authors_dropdown  = '<label class="inline-edit-author">';
    1515                         $authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
    1516                         $authors_dropdown .= $authors;
    1517                         $authors_dropdown .= '</label>';
    1518                 endif;
    1519         endif; // authors
    1520         ?>
    1521 
    1522         <?php
    1523         if ( ! $bulk ) {
    1524                 echo $authors_dropdown;}
     1496                        if ( post_type_supports( $screen->post_type, 'author' ) ) :
     1497                                $authors_dropdown = '';
     1498
     1499                                if ( current_user_can( $post_type_object->cap->edit_others_posts ) ) :
     1500                                        $users_opt = array(
     1501                                                'hide_if_only_one_author' => false,
     1502                                                'who'                     => 'authors',
     1503                                                'name'                    => 'post_author',
     1504                                                'class'                   => 'authors',
     1505                                                'multi'                   => 1,
     1506                                                'echo'                    => 0,
     1507                                                'show'                    => 'display_name_with_login',
     1508                                        );
     1509                                        if ( $bulk ) {
     1510                                                $users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' );
     1511                                        }
     1512
     1513                                        if ( $authors = wp_dropdown_users( $users_opt ) ) :
     1514                                                $authors_dropdown  = '<label class="inline-edit-author">';
     1515                                                $authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
     1516                                                $authors_dropdown .= $authors;
     1517                                                $authors_dropdown .= '</label>';
     1518                                        endif;
     1519                                endif; // authors
     1520                                ?>
     1521
     1522                                <?php
     1523                                if ( ! $bulk ) {
     1524                                        echo $authors_dropdown;}
    15251525        endif; // post_type_supports author
    15261526
    1527 if ( ! $bulk && $can_publish ) :
    1528         ?>
     1527                        if ( ! $bulk && $can_publish ) :
     1528                                ?>
    15291529
    15301530                <div class="inline-edit-group wp-clearfix">
     
    15461546                        </div>
    15471547
    1548         <?php endif; ?>
     1548                                <?php endif; ?>
    15491549
    15501550                </div></fieldset>
     
    16911691
    16921692                        <div class="inline-edit-group wp-clearfix">
    1693                         <?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
     1693                                <?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
    16941694                                <label class="alignleft">
    16951695                                        <input type="checkbox" name="comment_status" value="open" />
     
    17041704                        </div>
    17051705
    1706         <?php
     1706                                <?php
    17071707        endif; // $bulk
    17081708        endif; // post_type_supports comments or pings
Note: See TracChangeset for help on using the changeset viewer.