year_link
Filters the year archive permalink.
Использование
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(строка)
- Permalink for the year archive.
- $year(int)
- Year for the archive.
Список изменений
С версии 1.5.0 | Введена. |
Где вызывается хук
year_link
wp-includes/link-template.php 568
return apply_filters( 'year_link', $yearlink, $year );