filtrod 3.9.0
network_by_path_segments_count
Opis — z kodu źródłowego
Filters the number of path segments to consider when searching for a site.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$segments | int | null | The number of path segments to consider. WordPress by default looks at one path segment. The function default of null only makes sense when you know the requested path should match a network. |
$domain | string | The requested domain. |
$path | string | The requested path, in full. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'network_by_path_segments_count', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'network_by_path_segments_count', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii