wppaste
WordPress

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

Since
2.6.0, 4.5.0, 5.2.0
Filters the archive link content.

Compatibility

WordPress
since 5.2.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$urlstring
URL to archive.
$textstring
Archive text description.
$formatstring
Link format. Can be 'link', 'option', 'html', or custom.
$beforestring
Content to prepend to the description.
$afterstring
Content to append to the description.
$selectedbool
True if the current page is the selected archive.

Where this hook fires · 1

  • wp-includes/general-template.php:1953get_archives_link()

Source code

	 * @param string $text      Archive text description.	 * @param string $format    Link format. Can be 'link', 'option', 'html', or custom.	 * @param string $before    Content to prepend to the description.	 * @param string $after     Content to append to the description.	 * @param bool   $selected  True if the current page is the selected archive.	 */	return apply_filters( 'get_archives_link', $link_html, $url, $text, $format, $before, $after, $selected );} /** * Displays archive links based on type and format. * * @since 1.2.0

Changelog

Introduced in 2.6.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

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

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.