wp_speculation_rules_href_exclude_paths

FILTER wp-includes\speculative-loading.php (ligne 154) github
Filters the paths for which speculative loading should be disabled. All paths should start in a forward slash, relative to the root document. The `*` can be used as a wildcard. If the WordPress site is in a subdirectory, the exclude paths will automatically be prefixed as necessary. Note that WordPress always excludes certain path patterns such as `/wp-login.php` and `/wp-admin/*`, and those cannot be modified using the filter.

Paramètres

Entrée :
array(
Sortie :
@param string[] $href_exclude_paths Additional path patterns to disable speculative loading for.
@param string   $mode               Mode used to apply speculative loading. Either 'prefetch' or 'prerender'.

Utilisation

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

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

Actualités

Chargement des actualités...