get_archives_link

FUNCTION wp-includes\general-template.php (ligne 1882) github
Filters the description for a post type archive.

Paramètres

Entrée :
$url, $text, $format = 'html', $before = '', $after = '', $selected = false
Sortie :
@param string       $description   The post type description.
@param WP_Post_Type $post_type_obj The post type object.
@param string $url      URL to archive.
@param string $text     Archive text description.
@param string $format   Optional. Can be 'link', 'option', 'html', or custom. Default 'html'.
@param string $before   Optional. Content to prepend to the description. Default empty.
@param string $after    Optional. Content to append to the description. Default empty.
@param bool   $selected Optional. Set to true if the current page is the selected archive page. Default false.
@return string HTML link content for archive.

Utilisation

// Utilisation de la fonction get_archives_link
$result = get_archives_link($url, $text, $format = 'html', $before = '', $after = '', $selected = false);

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

Actualités

Chargement des actualités...