Skip to content

Instantly share code, notes, and snippets.

@ckpicker
Last active January 22, 2021 18:16
Show Gist options
  • Save ckpicker/e44578587d4e127d53ca to your computer and use it in GitHub Desktop.
Save ckpicker/e44578587d4e127d53ca to your computer and use it in GitHub Desktop.
Events Calendar 3.6 // Customize 'Event has Passed' notice
add_filter( 'tribe_events_the_notices', 'customize_notice', 10, 2 );
function customize_notice( $html, $notices ) {
//If text is found in notice, then replace it
if( stristr( $html, 'This event has passed.' ) ) {
//Customize the message as needed
$html = str_replace( 'This event has passed.', 'This event has passed and <a href="">add a link</a>.', $html );
}
return $html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment