get_archives_link WordPress Filter Hook

The get_archives_link Wordpress hook is used to retrieve the URL for an archive page. This hook is used by the Wordpress core get_archives() function.

apply_filters( 'get_archives_link', string $link_html, string $url, string $text, string $format, string $before, string $after, bool $selected ) #

Filters the archive link content.


Parameters

$link_html

(string)The archive HTML link content.

$url

(string)URL to archive.

$text

(string)Archive text description.

$format

(string)Link format. Can be 'link', 'option', 'html', or custom.

$before

(string)Content to prepend to the description.

$after

(string)Content to append to the description.

$selected

(bool)True if the current page is the selected archive.


Top ↑

Source

File: wp-includes/general-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.2.0Added the $selected parameter.
4.5.0Added the $url, $text, $format, $before, and $after parameters.
2.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More