site_by_path_segments_count

FILTER wp-includes\ms-load.php (ligne 177) github
Filters the number of path segments to consider when searching for a site.

Paramètres

Entrée :
$segments, $domain, $path
Sortie :
@param int|null $segments The number of path segments to consider. WordPress by default looks at
@param string   $domain   The requested domain.
@param string   $path     The requested path, in full.

Utilisation

// Modifier la valeur avec le filtre 'site_by_path_segments_count'
add_filter('site_by_path_segments_count', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($segments) {
    // Modifier la valeur
    return $segments;
}

Actualités

Chargement des actualités...