BakerMan

String hack - drop 'event' in category label (TEC 3.0)

Jul 27th, 2013
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. /**
  2.  * This is a string-based hack to change the "Event Category" meta label to
  3.  * "Category" (and the same for the plural forms). In an ideal world we would
  4.  * use something more resilient like using tribe_set_meta_label().
  5.  */
  6. function edit_tribe_single_meta_output($html, $meta_group_id) {
  7.     if ('tribe_event_details' !== 'tribe_event_details') return $html;
  8.     $html = str_replace('Event Category', 'Category', $html);
  9.     return str_replace('Event Categories', 'Categories', $html);
  10. }
  11.  
  12. add_filter('tribe_get_meta_group', 'edit_tribe_single_meta_output', 10, 2);
Add Comment
Please, Sign In to add comment