Multisite: Add a ms_sites_list_table_query_args
filter to WP_MS_Sites_List_Table
.
This allows a developer to filter the arguments used to query sites during the `prepare_items()` method. Props flixos90. Fixes #26580. git-svn-id: https://develop.svn.wordpress.org/trunk@37899 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d790268b48
commit
2e9bb996b9
@ -158,6 +158,15 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
|
||||
$args['no_found_rows'] = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the arguments for the site query in the sites list table.
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @param array $args An array of get_sites() arguments.
|
||||
*/
|
||||
$args = apply_filters( 'ms_sites_list_table_query_args', $args );
|
||||
|
||||
$_sites = get_sites( $args );
|
||||
if ( is_array( $_sites ) ) {
|
||||
update_site_cache( $_sites );
|
||||
|
Loading…
Reference in New Issue
Block a user