plugins_api_result
Filter HookDescription
Filters the Plugin Installation API response results.Hook Information
File Location |
wp-admin/includes/plugin-install.php
View on GitHub
|
Hook Type | Filter |
Line Number | 230 |
Hook Parameters
Type | Name | Description |
---|---|---|
object|WP_Error
|
$res
|
Response object or WP_Error. |
string
|
$action
|
The type of information being requested from the Plugin Installation API. |
object
|
$args
|
Plugin API arguments. |
Usage Examples
Basic Usage
<?php
// Hook into plugins_api_result
add_filter('plugins_api_result', 'my_custom_filter', 10, 3);
function my_custom_filter($res, $action, $args) {
// Your custom filtering logic here
return $res;
}
Source Code Context
wp-admin/includes/plugin-install.php:230
- How this hook is used in WordPress core
<?php
225 *
226 * @param object|WP_Error $res Response object or WP_Error.
227 * @param string $action The type of information being requested from the Plugin Installation API.
228 * @param object $args Plugin API arguments.
229 */
230 return apply_filters( 'plugins_api_result', $res, $action, $args );
231 }
232
233 /**
234 * Retrieves popular WordPress plugin tags.
235 *
PHP Documentation
<?php
/**
* Filters the Plugin Installation API response results.
*
* @since 2.7.0
*
* @param object|WP_Error $res Response object or WP_Error.
* @param string $action The type of information being requested from the Plugin Installation API.
* @param object $args Plugin API arguments.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-admin/includes/plugin-install.php
Related Hooks
Related hooks will be displayed here in future updates.