Last active
January 22, 2021 18:16
-
-
Save ckpicker/e44578587d4e127d53ca to your computer and use it in GitHub Desktop.
Events Calendar 3.6 // Customize 'Event has Passed' notice
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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