Using WordPress ‘install_plugins_{$tab}’ PHP action

The install_plugins_{$tab} WordPress PHP action fires after the plugins list table in each tab of the Install Plugins screen. The dynamic portion of the hook name, $tab, allows for targeting individual tabs.

Usage

add_action('install_plugins_{$tab}', 'your_custom_function', 10, 1);

function your_custom_function($paged) {
  // your custom code here
}

Parameters

  • $paged (int): The current page number of the plugins list table.

More information

See WordPress Developer Resources: install_plugins_{$tab}

Examples

Modify the Beta tab in the Install Plugins screen

Add custom content after the plugin list table in the Beta tab.

add_action('install_plugins_beta', 'your_custom_function_beta', 10, 1);

function your_custom_function_beta($paged) {
  // your custom code here
  echo '<p>Your custom content for Beta tab.</p>';
}

Add custom content to the Favorites tab

Add custom content after the plugin list table in the Favorites tab.

add_action('install_plugins_favorites', 'your_custom_function_favorites', 10, 1);

function your_custom_function_favorites($paged) {
  // your custom code here
  echo '<p>Your custom content for Favorites tab.</p>';
}

Add custom content after the plugin list table in the Featured tab.

add_action('install_plugins_featured', 'your_custom_function_featured', 10, 1);

function your_custom_function_featured($paged) {
  // your custom code here
  echo '<p>Your custom content for Featured tab.</p>';
}

Add custom content after the plugin list table in the Popular tab.

add_action('install_plugins_popular', 'your_custom_function_popular', 10, 1);

function your_custom_function_popular($paged) {
  // your custom code here
  echo '<p>Your custom content for Popular tab.</p>';
}

Add custom content after the plugin list table in the Recommended tab.

add_action('install_plugins_recommended', 'your_custom_function_recommended', 10, 1);

function your_custom_function_recommended($paged) {
  // your custom code here
  echo '<p>Your custom content for Recommended tab.</p>';
}