filtrod 2.7.0
plugins_api
Opis — z kodu źródłowego
Filters the response for the current WordPress.org Plugin Installation API request.
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.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$result | false | object | array | The result object or array. Default false. |
$action | string | The type of information being requested from the Plugin Installation API. |
$args | object | Plugin API arguments. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'plugins_api', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'plugins_api', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii