WP HOOKS
filtrdynamicznyod 5.4.2

set_screen_option_{$option}

Args 3Plik wp-admin/includes/misc.php

Opis — z kodu źródłowego

Filters a screen option value before it is set.

The dynamic portion of the hook name, $option, refers to the option name. Returning false from the filter will skip saving the current option.

Parametry

ParametrTypOpis
$screen_optionmixedThe value to save instead of the option value. Default false (to skip saving the current option).
$optionstringThe option name.
$valueintThe option value.

Wywołanie

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

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

Popularne w tej kategorii