WP HOOKS
filtrod 2.7.0

plugins_api

Args 3Plik wp-admin/includes/plugin-install.phpDokumentacja WP ↗

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

ParametrTypOpis
$resultfalse | object | arrayThe result object or array. Default false.
$actionstringThe type of information being requested from the Plugin Installation API.
$argsobjectPlugin 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
}

Popularne w tej kategorii