show_advanced_plugins
Filter HookDescription
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'.Hook Information
File Location |
wp-admin/includes/class-wp-plugins-list-table.php
View on GitHub
|
Hook Type | Filter |
Line Number | 149 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$show
|
Whether to show the advanced plugins for the specified plugin type. Default true. |
string
|
$type
|
The plugin type. Accepts 'mustuse', 'dropins'. |
Usage Examples
Basic Usage
<?php
// Hook into show_advanced_plugins
add_filter('show_advanced_plugins', 'my_custom_filter', 10, 2);
function my_custom_filter($show, $type) {
// Your custom filtering logic here
return $show;
}
Source Code Context
wp-admin/includes/class-wp-plugins-list-table.php:149
- How this hook is used in WordPress core
<?php
144 if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) ) {
145 $plugins['mustuse'] = get_mu_plugins();
146 }
147
148 /** This action is documented in wp-admin/includes/class-wp-plugins-list-table.php */
149 if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) ) {
150 $plugins['dropins'] = get_dropins();
151 }
152
153 if ( current_user_can( 'update_plugins' ) ) {
154 $current = get_site_transient( 'update_plugins' );
PHP Documentation
<?php
/**
* 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'.
*
* @since 3.0.0
*
* @param bool $show Whether to show the advanced plugins for the specified
* plugin type. Default true.
* @param string $type The plugin type. Accepts 'mustuse', 'dropins'.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-admin/includes/class-wp-plugins-list-table.php
Related Hooks
Related hooks will be displayed here in future updates.