user_trailingslashit

FUNCTION wp-includes\link-template.php (ligne 18) github
Filters the display of the permalink for the current post.

Paramètres

Entrée :
$url, $type_of_url = ''
Sortie :
@param string      $permalink The permalink for the current post.
@param int|WP_Post $post      Post ID, WP_Post object, or 0. Default 0.
@param string $url         URL with or without a trailing slash.
@param string $type_of_url Optional. The type of URL being considered (e.g. single, category, etc)
@return string The URL with the trailing slash appended or stripped.

Utilisation

// Utilisation de la fonction user_trailingslashit
$result = user_trailingslashit($url, $type_of_url = '');

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

Actualités

Chargement des actualités...