Support

Home Forums Event Espresso Premium Change Wording of "This event has expired or is no longer available" notice

Change Wording of "This event has expired or is no longer available" notice

Posted: March 19, 2015 at 10:59 am

Viewing 3 reply threads


Mike Tidmore

March 19, 2015 at 10:59 am

I can’t seem to find this notice to be able to change the wording. I would expect it to be in the language file? No luck though…
Thanks in advance
-Mike


Lorenzo Orlando Caum

  • Support Staff

March 19, 2015 at 12:21 pm

Hi Mike,

That is wrapped in a text domain:

__('This event has expired or is no longer available.', 'event_espresso')

It can be changed by using a gettext filter:

function ee_expired_messaging_changes( $translated, $original, $domain ) {
 
    $strings = array(
        'This event has expired or is no longer available.' => 'Replace me with new messaging.',
        // Add some more strings here
    );

    if ( isset( $strings[$original] ) ) {
        $translations = get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
 
add_filter( 'gettext', 'ee_expired_messaging_changes', 10, 3 );

It can be added to your child theme’s functions.php file (do not include the opening php tag) or a site specific plugin:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/


Lorenzo


Mike Tidmore

March 20, 2015 at 9:23 am

Thanks very much!


Lorenzo Orlando Caum

  • Support Staff

March 20, 2015 at 10:33 am

You are welcome!


Lorenzo

Viewing 3 reply threads

The support post ‘Change Wording of "This event has expired or is no longer available" notice’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso