Skip to content

Instantly share code, notes, and snippets.

@cliffordp cliffordp/functions.php
Last active Sep 26, 2019

Embed
What would you like to do?
Prefix a string with "MyOhMy_" to easily identify that this function is happening on the passed text.
<?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
You can’t perform that action at this time.