I am completely new in using apply_filters()
while making a theme.
I use a standard Wordpress widget to display calendar.
However i need to change his HTML output to get a link button to current month in certain place.
This is how I found the apply_filters()
function but i don't know how to use it.
Do am i right I can achieve the desired effect with it?
Original function get_calendar()
have a part of code below:
if ( $next ) {
$calendar_output .= "\n\t\t" . '<span class="wp-calendar-nav-next"><a href="' . get_month_link( $next->year, $next->month ) . '">' . $wp_locale->get_month_abbrev( $wp_locale->get_month( $next->month ) ) . ' »</a></span>';
} else {
$calendar_output .= "\n\t\t" . '<span class="wp-calendar-nav-next"> </span>';
}
What i need is to change else
outuput to :
$calendar_output .= "\n\t\t" . '<span class="wp-calendar-nav-next"><a href="#">My link</a></span>';
I know that if I duplicate get_calendar()
to my function.php i will be able to do anything I want, but i want to try make this by using any filter or hook if the Wordpress gives us such possibility.
Thank You in advance for your response.