plugins_api_args
Filters the WordPress.org Plugin Installation API arguments.
Important: An object MUST be returned to this filter.
Использование
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(объект)
- Plugin API arguments.
- $action(строка)
- The type of information being requested from the Plugin Installation API.
Список изменений
С версии 2.7.0 | Введена. |
Где вызывается хук
wp-admin/includes/plugin-install.php 134
$args = apply_filters( 'plugins_api_args', $args, $action );