Skip to content

Instantly share code, notes, and snippets.

@lorenzocaum
Last active September 19, 2015 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lorenzocaum/79b2e8c1acac2a9556f9 to your computer and use it in GitHub Desktop.
Save lorenzocaum/79b2e8c1acac2a9556f9 to your computer and use it in GitHub Desktop.
Replace the verbiage/messaging on the the Events Table View Template Add-on for Event Espresso 4

Add the sample code below to your child theme's functions.php file or in a site specific plugin.

<?php
//* Do NOT include the opening php tag
 
//* Replace verbiage on the events table view template for Event Espresso 4
function ee_change_events_table_view_template_messaging( $translated, $original, $domain ) {
 
    $strings = array(
        'Category Filter' => 'Replace me with new text or remove this statement to remove the entire messaging',
        'Search:' => 'Replace me with new text or remove this statement to remove the entire messaging',
    );

    if ( isset( $strings[$original] ) ) {
        $translations = &get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
 
add_filter( 'gettext', 'ee_change_events_table_view_template_messaging', 10, 3 );
@lorenzocaum
Copy link
Author

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment