show_advanced_plugins

Filters whether to display the advanced plugins list table.

Description

apply_filters( 'show_advanced_plugins', (bool) $true, (string) $mustuse ); 

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..

Parameters (2)

0. $true (bool) => true
Whether to show the advanced plugins for the specified plugin type. Default true.
1. $mustuse (string) => 'mustuse'
The plugin type. Accepts mustuse,, dropins..

Usage

To run the hook, copy the example below.
  1. $true = apply_filters( 'show_advanced_plugins', $true, $mustuse ); 
  2.  
  3. if ( !empty( $true ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the show_advanced_plugins callback 
  2. function filter_show_advanced_plugins( $true, $mustuse ) { 
  3. // make filter magic happen here... 
  4. return $true
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'show_advanced_plugins', 'filter_show_advanced_plugins', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'show_advanced_plugins', 'filter_show_advanced_plugins', 10, 2 ); 

Defined (2)

The filter is defined in the following location(s).

/wp-admin/includes/class-wp-plugins-list-table.php  
  1. if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) ) { 
  1. if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) )