filtrod 4.9.0
pre_get_main_site_id
Opis — z kodu źródłowego
Filters the main site ID.
Returning a positive integer will effectively short-circuit the function.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$main_site_id | int | null | If a positive integer is returned, it is interpreted as the main site ID. |
$network | \WP_Network | The network object for which the main site was detected. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_get_main_site_id', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_get_main_site_id', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii