views_(screen_id)
Filters the list of available list table views.
The dynamic portion of the hook name, $this->screen->id, refers to the ID of the current screen.
Usage
add_filter( 'views_(screen_id)', 'wp_kama_views_screen_id_filter' ); /** * Function for `views_(screen_id)` filter-hook. * * @param string[] $views An array of available list table views. * * @return string[] */ function wp_kama_views_screen_id_filter( $views ){ // filter... return $views; }
- $views(string[])
- An array of available list table views.
Changelog
Since 3.1.0 | Introduced. |
Where the hook is called
views_(screen_id)
views_(screen_id)
views_(screen_id)
wp-admin/includes/class-wp-list-table.php 521
$views = apply_filters( "views_{$this->screen->id}", $views );
wp-admin/includes/class-wp-media-list-table.php 301
$views = apply_filters( "views_{$this->screen->id}", array() );
wp-admin/includes/class-wp-plugin-install-list-table.php 340
$views = apply_filters( "views_{$this->screen->id}", $views );