WP HOOKS
filtrdynamicznyod 3.9.0

pre_set_theme_mod_{$name}

Args 2Plik wp-includes/theme.php

Opis — z kodu źródłowego

Filters the theme modification, or 'theme_mod', value on save.

The dynamic portion of the hook name, $name, refers to the key name of the modification array. For example, 'header_textcolor', 'header_image', and so on depending on the theme options.

Parametry

ParametrTypOpis
$valuemixedThe new value of the theme modification.
$old_valuemixedThe current value of the theme modification.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_set_theme_mod_{$name}', 'twoja_funkcja', 10, 2 );

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

Popularne w tej kategorii