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
This commit is contained in:
parent
500c0118d4
commit
b615c45103
|
@ -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' ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,9 @@ class WP_Links_List_Table extends WP_List_Table {
|
|||
);
|
||||
|
||||
echo '<label class="screen-reader-text" for="cat_id">' . __( 'Filter by category' ) . '</label>';
|
||||
|
||||
wp_dropdown_categories( $dropdown_options );
|
||||
|
||||
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -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' ) );
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue