Filter hook 'all_plugins'

in WP Core File wp-admin/includes/class-wp-plugins-list-table.php at line 105

View Source

all_plugins

Filter Hook
Description
Filters the full array of plugins to list in the Plugins list table.

Hook Information

File Location wp-admin/includes/class-wp-plugins-list-table.php View on GitHub
Hook Type Filter
Line Number 105

Hook Parameters

Type Name Description
array $all_plugins An array of plugins to display in the list table.

Usage Examples

Basic Usage
<?php
// Hook into all_plugins
add_filter('all_plugins', 'my_custom_filter', 10, 1);

function my_custom_filter($all_plugins) {
    // Your custom filtering logic here
    return $all_plugins;
}

Source Code Context

wp-admin/includes/class-wp-plugins-list-table.php:105 - How this hook is used in WordPress core
<?php
 100  		 *
 101  		 * @see get_plugins()
 102  		 *
 103  		 * @param array $all_plugins An array of plugins to display in the list table.
 104  		 */
 105  		$all_plugins = apply_filters( 'all_plugins', get_plugins() );
 106  
 107  		$plugins = array(
 108  			'all'                => $all_plugins,
 109  			'search'             => array(),
 110  			'active'             => array(),

PHP Documentation

<?php
/**
		 * Filters the full array of plugins to list in the Plugins list table.
		 *
		 * @since 3.0.0
		 *
		 * @see get_plugins()
		 *
		 * @param array $all_plugins An array of plugins to display in the list table.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-admin/includes/class-wp-plugins-list-table.php
Related Hooks

Related hooks will be displayed here in future updates.