Make WordPress Core

Changeset 48722


Ignore:
Timestamp:
08/04/2020 03:55:25 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Comments: Use the existing static variable instead of calling ::has_items() again in WP_Comments_List_Table::extra_tablenav().

Additionally, removed unnecessary esc_html() on the Filter button label. Core translations are considered safe, and this label is not escaped in any other instance.

Props whyisjake, SergeyBiryukov.
Fixes #40188.

Location:
trunk/src/wp-admin/includes
Files:
3 edited

Legend:

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

    r48693 r48722  
    398398
    399399            $this->comment_status_dropdown( $comment_type );
     400
    400401            /**
    401402             * Fires just before the Filter submit button for comment types.
     
    407408            $output = ob_get_clean();
    408409
    409             if ( ! empty( $output ) && $this->has_items() ) {
     410            if ( ! empty( $output ) && $has_items ) {
    410411                echo $output;
    411                 submit_button( esc_html__( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
     412                submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
    412413            }
    413414        }
  • trunk/src/wp-admin/includes/class-wp-links-list-table.php

    r47595 r48722  
    116116
    117117            echo '<label class="screen-reader-text" for="cat_id">' . __( 'Filter by category' ) . '</label>';
     118
    118119            wp_dropdown_categories( $dropdown_options );
     120
    119121            submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
    120122            ?>
  • trunk/src/wp-admin/includes/class-wp-ms-sites-list-table.php

    r48595 r48722  
    333333             */
    334334            do_action( 'restrict_manage_sites', $which );
     335
    335336            $output = ob_get_clean();
     337
    336338            if ( ! empty( $output ) ) {
    337339                echo $output;
Note: See TracChangeset for help on using the changeset viewer.