show_advanced_plugins filter-hookWP 3.0.0

Filters whether to display the advanced plugins list table.

There are two types of advanced plugins - must-use and drop-ins - which can be used in a single site or Multisite network.

The $type parameter allows you to differentiate between the type of advanced plugins to filter the display of. Contexts include 'mustuse' and 'dropins'.

Usage

add_filter( 'show_advanced_plugins', 'wp_kama_show_advanced_plugins_filter', 10, 2 );

/**
 * Function for `show_advanced_plugins` filter-hook.
 * 
 * @param bool   $show Whether to show the advanced plugins for the specified plugin type.
 * @param string $type The plugin type. Accepts 'mustuse', 'dropins'.
 *
 * @return bool
 */
function wp_kama_show_advanced_plugins_filter( $show, $type ){

	// filter...
	return $show;
}
$show(true|false)
Whether to show the advanced plugins for the specified plugin type.
Default: true
$type(string)
The plugin type. Accepts 'mustuse', 'dropins'.

Changelog

Since 3.0.0 Introduced.

Where the hook is called

WP_Plugins_List_Table::prepare_items()
show_advanced_plugins
wp-admin/includes/class-wp-plugins-list-table.php 145
if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) ) {
wp-admin/includes/class-wp-plugins-list-table.php 150
if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) ) {

Where the hook is used in WordPress

Usage not found.