Action hook 'pre_current_active_plugins'

in WP Core File wp-admin/plugins.php at line 800

View Source

pre_current_active_plugins

Action Hook
Description
Fires before the plugins list table is rendered. This hook also fires before the plugins list table is rendered in the Network Admin. Please note: The 'active' portion of the hook name does not refer to whether the current view is for active plugins, but rather all plugins actively-installed.

Hook Information

File Location wp-admin/plugins.php View on GitHub
Hook Type Action
Line Number 800

Hook Parameters

Type Name Description
array[] $plugins_all An array of arrays containing information on all installed plugins.

Usage Examples

Basic Usage
<?php
// Hook into pre_current_active_plugins
add_action('pre_current_active_plugins', 'my_custom_function', 10, 1);

function my_custom_function($plugins_all) {
    // Your custom code here
}

Source Code Context

wp-admin/plugins.php:800 - How this hook is used in WordPress core
<?php
 795   *
 796   * @since 3.0.0
 797   *
 798   * @param array[] $plugins_all An array of arrays containing information on all installed plugins.
 799   */
 800  do_action( 'pre_current_active_plugins', $plugins['all'] );
 801  ?>
 802  
 803  <?php $wp_list_table->views(); ?>
 804  
 805  <form class="search-form search-plugins" method="get">

PHP Documentation

<?php
/**
 * Fires before the plugins list table is rendered.
 *
 * This hook also fires before the plugins list table is rendered in the Network Admin.
 *
 * Please note: The 'active' portion of the hook name does not refer to whether the current
 * view is for active plugins, but rather all plugins actively-installed.
 *
 * @since 3.0.0
 *
 * @param array[] $plugins_all An array of arrays containing information on all installed plugins.
 */
Quick Info
  • Hook Type: Action
  • Parameters: 1
  • File: wp-admin/plugins.php
Related Hooks

Related hooks will be displayed here in future updates.