plugins_api_args
Filter HookDescription
Filters the WordPress.org Plugin Installation API arguments. Important: An object MUST be returned to this filter.Hook Information
File Location |
wp-admin/includes/plugin-install.php
View on GitHub
|
Hook Type | Filter |
Line Number | 129 |
Hook Parameters
Type | Name | Description |
---|---|---|
object
|
$args
|
Plugin API arguments. |
string
|
$action
|
The type of information being requested from the Plugin Installation API. |
Usage Examples
Basic Usage
<?php
// Hook into plugins_api_args
add_filter('plugins_api_args', 'my_custom_filter', 10, 2);
function my_custom_filter($args, $action) {
// Your custom filtering logic here
return $args;
}
Source Code Context
wp-admin/includes/plugin-install.php:129
- How this hook is used in WordPress core
<?php
124 * @since 2.7.0
125 *
126 * @param object $args Plugin API arguments.
127 * @param string $action The type of information being requested from the Plugin Installation API.
128 */
129 $args = apply_filters( 'plugins_api_args', $args, $action );
130
131 /**
132 * Filters the response for the current WordPress.org Plugin Installation API request.
133 *
134 * Returning a non-false value will effectively short-circuit the WordPress.org API request.
PHP Documentation
<?php
/**
* Filters the WordPress.org Plugin Installation API arguments.
*
* Important: An object MUST be returned to this filter.
*
* @since 2.7.0
*
* @param object $args Plugin API arguments.
* @param string $action The type of information being requested from the Plugin Installation API.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-admin/includes/plugin-install.php
Related Hooks
Related hooks will be displayed here in future updates.