views_(screen_id) filter-hookWP 3.1.0

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

WP_List_Table::views()
views_(screen_id)
WP_Media_List_Table::views()
views_(screen_id)
WP_Plugin_Install_List_Table::views()
views_(screen_id)
wp-admin/includes/class-wp-list-table.php 515
$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 );

Where the hook is used in WordPress

Usage not found.