year_link filter-hookWP 1.5.0

Filters the year archive permalink.

Usage

add_filter( 'year_link', 'wp_kama_year_link_filter', 10, 2 );

/**
 * Function for `year_link` filter-hook.
 * 
 * @param string $yearlink Permalink for the year archive.
 * @param int    $year     Year for the archive.
 *
 * @return string
 */
function wp_kama_year_link_filter( $yearlink, $year ){

	// filter...
	return $yearlink;
}
$yearlink(string)
Permalink for the year archive.
$year(int)
Year for the archive.

Changelog

Since 1.5.0 Introduced.

Where the hook is called

get_year_link()
year_link
wp-includes/link-template.php 563
return apply_filters( 'year_link', $yearlink, $year );

Where the hook is used in WordPress

Usage not found.