From b615c451037f1c103ac24ecca9981ee996e2a286 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 4 Aug 2020 15:58:06 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@48722 git-svn-id: http://core.svn.wordpress.org/trunk@48484 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-comments-list-table.php | 5 +++-- wp-admin/includes/class-wp-links-list-table.php | 2 ++ wp-admin/includes/class-wp-ms-sites-list-table.php | 2 ++ wp-includes/version.php | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index eed0a795f0..6dfd67d466 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -397,6 +397,7 @@ class WP_Comments_List_Table extends WP_List_Table { ob_start(); $this->comment_status_dropdown( $comment_type ); + /** * Fires just before the Filter submit button for comment types. * @@ -406,9 +407,9 @@ class WP_Comments_List_Table extends WP_List_Table { $output = ob_get_clean(); - if ( ! empty( $output ) && $this->has_items() ) { + if ( ! empty( $output ) && $has_items ) { echo $output; - submit_button( esc_html__( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); + submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); } } diff --git a/wp-admin/includes/class-wp-links-list-table.php b/wp-admin/includes/class-wp-links-list-table.php index e5962b5bec..ae7b56a302 100644 --- a/wp-admin/includes/class-wp-links-list-table.php +++ b/wp-admin/includes/class-wp-links-list-table.php @@ -115,7 +115,9 @@ class WP_Links_List_Table extends WP_List_Table { ); echo ''; + wp_dropdown_categories( $dropdown_options ); + submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); ?> diff --git a/wp-admin/includes/class-wp-ms-sites-list-table.php b/wp-admin/includes/class-wp-ms-sites-list-table.php index 3b3c7a88a6..50ba8f32ef 100644 --- a/wp-admin/includes/class-wp-ms-sites-list-table.php +++ b/wp-admin/includes/class-wp-ms-sites-list-table.php @@ -332,7 +332,9 @@ class WP_MS_Sites_List_Table extends WP_List_Table { * @param string $which The location of the extra table nav markup: 'top' or 'bottom'. */ do_action( 'restrict_manage_sites', $which ); + $output = ob_get_clean(); + if ( ! empty( $output ) ) { echo $output; submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'site-query-submit' ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index cc7dc302ca..831b1d7a86 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-48721'; +$wp_version = '5.6-alpha-48722'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.