Last active
September 26, 2019 06:27
-
-
Save cliffordp/9d878488e5def7419c8bb906f8929d15 to your computer and use it in GitHub Desktop.
Prefix a string with "MyOhMy_" to easily identify that this function is happening on the passed text.
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
<?php | |
/** | |
* Prefix a string with "MyOhMy_" to easily identify that this function is happening on the passed text. | |
* | |
* Requires Event Tickets v4.10.9 (October 2019) or later. Functions are found in | |
* /wp-content/plugins/event-tickets/src/template-tags/tickets.php | |
* | |
* @link https://gist.github.com/cliffordp/9d878488e5def7419c8bb906f8929d15 This snippet. | |
* @link https://central.tri.be/issues/128298 Used to QA this ticket. | |
* @link https://cl.ly/403a9c5fe5e7 Screenshot of this snippet working on Attendees Report. | |
* @link https://cl.ly/8ad94792e421 Screenshot of this snippet working on TEC Event edit screen. | |
* @link https://cl.ly/1ccd13c19e21 Screenshot of this snippet working on TEC Event front end. | |
* | |
* @param $text | |
* | |
* @return string | |
*/ | |
function my_oh_my_128298( $text ) { | |
return 'MyOhMy_' . $text; | |
} | |
add_filter( 'tribe_get_rsvp_label_singular', 'my_oh_my_128298' ); | |
add_filter( 'tribe_get_rsvp_label_singular_lowercase', 'my_oh_my_128298' ); | |
add_filter( 'tribe_get_rsvp_label_plural', 'my_oh_my_128298' ); | |
add_filter( 'tribe_get_rsvp_label_plural_lowercase', 'my_oh_my_128298' ); | |
add_filter( 'tribe_get_ticket_label_singular', 'my_oh_my_128298' ); | |
add_filter( 'tribe_get_ticket_label_singular_lowercase', 'my_oh_my_128298' ); | |
add_filter( 'tribe_get_ticket_label_plural', 'my_oh_my_128298' ); | |
add_filter( 'tribe_get_ticket_label_plural_lowercase', 'my_oh_my_128298' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment