redirect_canonical

FUNCTION wp-includes\canonical.php (ligne 2) github
Canonical API to handle WordPress Redirecting Based on "Permalink Redirect" from Scott Yang and "Enforce www. Preference" by Mark Jaquith

Paramètres

Entrée :
$requested_url = null, $do_redirect = true
Sortie :
@param string $requested_url Optional. The URL that was requested, used to
@param bool   $do_redirect   Optional. Redirect to the new URL.
@return string|void The string of the URL, if redirect needed.

Utilisation

// Utilisation de la fonction redirect_canonical
$result = redirect_canonical($requested_url = null, $do_redirect = true);

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...