get_archives_link filter-hookWP 2.6.0

Filters the archive link content.

Usage

add_filter( 'get_archives_link', 'wp_kama_get_archives_link_filter', 10, 7 );

/**
 * Function for `get_archives_link` filter-hook.
 * 
 * @param string $link_html The archive HTML link content.
 * @param string $url       URL to archive.
 * @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 string
 */
function wp_kama_get_archives_link_filter( $link_html, $url, $text, $format, $before, $after, $selected ){

	// filter...
	return $link_html;
}
$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(true|false)
True if the current page is the selected archive.

Changelog

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

Where the hook is called

get_archives_link()
get_archives_link
wp-includes/general-template.php 1939
return apply_filters( 'get_archives_link', $link_html, $url, $text, $format, $before, $after, $selected );

Where the hook is used in WordPress

Usage not found.