month_link
Filters the month archive permalink.
Использование
add_filter( 'month_link', 'wp_kama_month_link_filter', 10, 3 );
/**
* Function for `month_link` filter-hook.
*
* @param string $monthlink Permalink for the month archive.
* @param int $year Year for the archive.
* @param int $month The month for the archive.
*
* @return string
*/
function wp_kama_month_link_filter( $monthlink, $year, $month ){
// filter...
return $monthlink;
}
- $monthlink(строка)
- Permalink for the month archive.
- $year(int)
- Year for the archive.
- $month(int)
- The month for the archive.
Список изменений
| С версии 1.5.0 | Введена. |
Где вызывается хук
month_link
wp-includes/link-template.php 608
return apply_filters( 'month_link', $monthlink, $year, $month );