Title: Change Events Calendar Admin Form Strings using a function
Last modified: August 20, 2016

---

# Change Events Calendar Admin Form Strings using a function

 *  [dwpierce](https://wordpress.org/support/users/dwpierce/)
 * (@dwpierce)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/change-events-calendar-admin-form-strings-using-a-function/)
 * Based on the post from Jonah West, “Change Events Calendar Strings Without Editing
   Language Files”
 * URL: [http://tri.be/change-events-calendar-strings-without-editing-language-files/](http://tri.be/change-events-calendar-strings-without-editing-language-files/)
 * Add reading up on ‘gettext’, I created a function to modify fields single event
   admin page for “The Events Calendar” since Jonah’s code only modifies the public
   page. I’ve run into an issue with the text modification for “Phone:” under “Event
   Location Details” to display “Venue Phone;”. This works correctly but the function
   also updates “Phone:” under the Event Organizer Details to also display “Venue
   Phone:”.
 * I have been searching for an solution to refine my Switch/Case statement to either“
   EventPhone” or “venue[Phone]”. So far I haven’t found any options.
 * Can someone from Modern Tribe help? I am developing this on a local site before
   I upload the code to the Events Pro site. So, I don’t have a URL to show at the
   moment.
 * Here is the code for my function, “theme_change_admin_field_name”.
 *     ```
       add_filter( 'gettext', 'theme_change_admin_field_names', 20, 3 );
       /**
        * Change comment form default field names.
        *
        * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
        */
       function theme_change_admin_field_names( $translated_text, $text, $domain ) {
   
           if ( is_admin() ) {
   
               switch ( $translated_text ) {
   
                   case 'Organizer Name:' :
   
                       $translated_text = __( 'Contact:', 'theme_text_domain' );
                       break;
   
                   case 'Phone:' :
   
                       $translated_text = __( 'Venue Phone:', 'theme_text_domain' );
                       break;
   
               }
   
           }
   
           return $translated_text;
       }
       ```
   

The topic ‘Change Events Calendar Admin Form Strings using a function’ is closed
to new replies.

## Tags

 * [gettext](https://wordpress.org/support/topic-tag/gettext/)

 * 0 replies
 * 1 participant
 * Last reply from: [dwpierce](https://wordpress.org/support/users/dwpierce/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/change-events-calendar-admin-form-strings-using-a-function/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
