WP HOOKS
filtrdynamicznyod 3.4.0

default_site_option_{$option}

Args 3Plik wp-includes/option.php

Opis — z kodu źródłowego

Filters the value of a specific default network option.

The dynamic portion of the hook name, $option, refers to the option name.

Parametry

ParametrTypOpis
$default_valuemixedThe value to return if the site option does not exist in the database.
$optionstringOption name.
$network_idintID of the network.

Wywołanie

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

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

Popularne w tej kategorii