WP HOOKS
filtrod 2.8.0

upgrader_pre_install

Args 2Plik wp-admin/includes/class-wp-upgrader.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the installation response before the installation has started.

Returning a value that could be evaluated as a WP_Error will effectively short-circuit the installation, returning that value instead.

Parametry

ParametrTypOpis
$responsebool | \WP_ErrorInstallation response.
$hook_extraarrayExtra arguments passed to hooked filters.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'upgrader_pre_install', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii