WordPress filter hook · part of WordPress core

plugins_api

A WordPress core filter that 15 plugins also fire themselves, running on 1.2M+ sites between them.

How to use plugins_api

It's a filter: your callback receives the value and 2 more arguments, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'plugins_api', function( $value, $action, $args ) {
	// Change $value here.
	return $value;
}, 10, 3 );

Argument names come from Migrate Guru's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

This hook is fired by WordPress core too. Official reference on developer.wordpress.org →

15 plugins that fire plugins_api

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. MainWP Child icon MainWP Child700,000+ installs apply_filters( 'plugins_api', false, 'plugin_information', array( 'slug' => $plugin ) ) class/class-mainwp-child-updates.php:445
  2. Migrate Guru icon Migrate Guru200,000+ installs apply_filters( 'plugins_api', false, $action, $args ) callback/wings/info.php:528
  3. MalCare WordPress Security Plugin icon MalCare WordPress Security Plugin100,000+ installs apply_filters( 'plugins_api', false, $action, $args ) callback/wings/info.php:569
  4. BlogVault Backup & Staging icon BlogVault Backup & Staging80,000+ installs apply_filters( 'plugins_api', false, $action, $args ) callback/wings/info.php:569
  5. Cloudways Site Manager icon Cloudways Site Manager50,000+ installs apply_filters( 'plugins_api', false, $action, $args ) callback/wings/info.php:529
  6. The WP Remote WordPress Plugin icon The WP Remote WordPress Plugin30,000+ installs apply_filters( 'plugins_api', false, $action, $args ) callback/wings/info.php:569
  7. DreamHost Automated Migration icon DreamHost Automated Migration10,000+ installs apply_filters( 'plugins_api', false, $action, $args ) callback/wings/info.php:528
  8. Cloudways WordPress Migrator icon Cloudways WordPress Migrator10,000+ installs apply_filters( 'plugins_api', false, $action, $args ) callback/wings/info.php:528
  9. Pressable Automated Migration icon Pressable Automated Migration5,000+ installs apply_filters( 'plugins_api', false, $action, $args ) callback/wings/info.php:528
  10. Migrate to WordPress.com icon Migrate to WordPress.com2,000+ installs apply_filters( 'plugins_api', false, $action, $args ) callback/wings/info.php:528
  11. Migrate To Liquid Web & Nexcess icon Migrate To Liquid Web & Nexcess1,000+ installs apply_filters( 'plugins_api', false, $action, $args ) callback/wings/info.php:528
  12. Pantheon Migrations icon Pantheon Migrations1,000+ installs apply_filters( 'plugins_api', false, $action, $args ) callback/wings/info.php:528
  13. Selling Commander for WooCommerce icon Selling Commander for WooCommerce50+ installs do_action( 'plugins_api', $remote, 'plugin_information', (object)array("slug" => $plugin_idenifier) ) sellingcommander.php:4090
  14. Plugin Bundles icon Plugin Bundles10+ installs apply_filters( 'plugins_api', false, $action, $args ) includes/bundles_overview.php:108
  15. Plugin Downloads Display icon Plugin Downloads DisplayFewer than 10 installs apply_filters( 'plugins_api', false, $action, $args ) plugin-download-display.php:42
  16. Plugin Promoter icon Plugin PromoterFewer than 10 installs apply_filters( 'plugins_api', false, $action, $args ) plugin-promoter.php:23

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.