WP HOOKS
filtrod 4.2.0

pre_prepare_themes_for_js

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

Opis — z kodu źródłowego

Filters theme data before it is prepared for JavaScript.

Passing a non-empty array will result in wp_prepare_themes_for_js() returning early with that value instead.

Parametry

ParametrTypOpis
$prepared_themesarrayAn associative array of theme data. Default empty array.
$themes\WP_Theme[] | nullAn array of theme objects to prepare, if any.
$current_themestringThe active theme slug.

Wywołanie

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

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

Popularne w tej kategorii