WP HOOKS
filtrod 3.9.0

network_by_path_segments_count

Args 3Plik wp-includes/class-wp-network.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the number of path segments to consider when searching for a site.

Parametry

ParametrTypOpis
$segmentsint | nullThe 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.
$domainstringThe requested domain.
$pathstringThe 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
}

Popularne w tej kategorii