WP HOOKS
filtrod 6.2.0

pre_wp_load_alloptions

Args 2Plik wp-includes/option.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the array of alloptions before it is populated.

Returning an array from the filter will effectively short circuit wp_load_alloptions(), returning that value instead.

Parametry

ParametrTypOpis
$alloptionsarray | nullAn array of alloptions. Default null.
$force_cacheboolWhether to force an update of the local cache from the persistent cache. Default false.

Wywołanie

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

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

Popularne w tej kategorii