plugins_api_args
Filters the WordPress.org Plugin Installation API arguments.
Important: An object MUST be returned to this filter.
Usage
add_filter( 'plugins_api_args', 'wp_kama_plugins_api_args_filter', 10, 2 ); /** * Function for `plugins_api_args` filter-hook. * * @param object $args Plugin API arguments. * @param string $action The type of information being requested from the Plugin Installation API. * * @return object */ function wp_kama_plugins_api_args_filter( $args, $action ){ // filter... return $args; }
- $args(object)
- Plugin API arguments.
- $action(string)
- The type of information being requested from the Plugin Installation API.
Changelog
Since 2.7.0 | Introduced. |
Where the hook is called
wp-admin/includes/plugin-install.php 134
$args = apply_filters( 'plugins_api_args', $args, $action );