Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Change the "upcoming" string (from The Events Calendar) to "list".
- *
- * Alternatively (and probably more efficiently) this change could be made in
- * a .mo/.po translation file.
- *
- * @param string $translated
- * @param string $untranslated
- * @param string $domain
- * @return string
- */
- function changeUpcomingEventsSlug($translated, $untranslated, $domain) {
- if ($untranslated === 'upcoming' and $domain === 'tribe-events-calendar') {
- remove_filter('gettext', __FUNCTION__, 20, 3);
- return 'list';
- }
- else return $translated;
- }
- /**
- * Set up a filter to change "upcoming" to "list".
- *
- * Before this works effectively you will need to flush the rewrite rules.
- * Normally, visiting Settings > Permalinks (no need to change anything) is
- * sufficient to do this.
- */
- add_filter('gettext', 'changeUpcomingEventsSlug', 20, 3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement