Skip to content

Instantly share code, notes, and snippets.

@ScottDeLuzio
Created September 6, 2017 20:16
Show Gist options
  • Save ScottDeLuzio/3e6c847fc047005d14a7d69ca8594b39 to your computer and use it in GitHub Desktop.
Save ScottDeLuzio/3e6c847fc047005d14a7d69ca8594b39 to your computer and use it in GitHub Desktop.
wpcrm_system_add_calendar_entry
function wpcrm_system_new_calendar_entry( $calendar, $month, $list_day, $year ){
// Display an entry on the calender on December 25th every year.
if ( $month == 12 && $list_day == 25 ){
$calendar .= '<li>Christmas</li>';
}
// Display an entry on the calendar on September 5th 2017
if ( $month == 9 && $list_day == 5 && $year == 2017 ){
$calendar .= '<li>This is a date specific entry</li>';
}
// Display an entry on the calendar on the 15th of every month
if ( $list_day == 15 ){
$calendar .= '<li>This is an entry for the 15th of every month</li>';
}
return $calendar;
}
add_filter( 'wpcrm_system_add_calendar_entry', 'wpcrm_system_new_calendar_entry', 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment