wppaste
WordPress

apply_filters( 'plugins_api', false|object|array $result, string $action, object $args )

Since
2.7.0
Filters the response for the current WordPress.org Plugin Installation API request.

Description

Returning a non-false value will effectively short-circuit the WordPress.org API request.

If $action is 'query_plugins' or 'plugin_information', an object MUST be passed.
If $action is 'hot_tags', an array should be passed.

Compatibility

WordPress
since 2.7.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$resultfalse|object|array
The result object or array. Default false.
$actionstring
The type of information being requested from the Plugin Installation API.
$argsobject
Plugin API arguments.

Where this hook fires · 1

  • wp-admin/includes/plugin-install.php:145plugins_api()

Source code

	 * @since 2.7.0	 *	 * @param false|object|array $result The result object or array. Default false.	 * @param string             $action The type of information being requested from the Plugin Installation API.	 * @param object             $args   Plugin API arguments.	 */	$res = apply_filters( 'plugins_api', false, $action, $args ); 	if ( false === $res ) { 		$url = 'http://api.wordpress.org/plugins/info/1.2/';		$url = add_query_arg(			array(

Changelog

Introduced in 2.7.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.0.4 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.