Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * This is a fairly crude bit of string manipulation relating to the
- * event list widget.
- *
- * It could be enhanced though to also catch other strings like "View
- * All Events" and to remove the <p>/<a> elements that surround them,
- * if necessary. An alternative approach (to remove strings) could be
- * a filter on the gettext hook.
- *
- * Targets TEC/ECP 3.4.x
- */
- add_action( 'tribe_events_before_list_widget', 'ob_start' );
- add_action( 'tribe_events_after_list_widget', 'custom_manipulate_eventlist_widget_output' );
- function custom_manipulate_eventlist_widget_output() {
- $widget_html = ob_get_clean();
- echo str_replace( 'View All Events in Category', '', $widget_html );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement