From e31bd15ab51bc36a0d9d98306a2d8a3c0f8a0559 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 20 Sep 2019 20:52:58 +0000 Subject: [PATCH] Networks and Sites: Add support for the `extra_tablenav()` method in `WP_MS_Sites_List_Table`. This method allows additional filters or other UI components to be added to the top and bottom of the `WP_List_Table` between the bulk actions dropdown and search input field. Fixes #45954. Props pbiron, desrosj. git-svn-id: https://develop.svn.wordpress.org/trunk@46211 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-ms-sites-list-table.php | 42 +++++++++++++++++++ src/wp-admin/network/sites.php | 12 +++--- 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/src/wp-admin/includes/class-wp-ms-sites-list-table.php b/src/wp-admin/includes/class-wp-ms-sites-list-table.php index edcec3366d..58030bea4b 100644 --- a/src/wp-admin/includes/class-wp-ms-sites-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-sites-list-table.php @@ -230,6 +230,48 @@ class WP_MS_Sites_List_Table extends WP_List_Table { } } + /** + * Extra controls to be displayed between bulk actions and pagination. + * + * @since 5.3.0 + * + * @param string $which + */ + protected function extra_tablenav( $which ) { + ?> +
+ 'site-query-submit' ) ); + } + } + ?> +
+