Skip to content

Instantly share code, notes, and snippets.

@andrasguseo
Created September 6, 2017 20:31
Show Gist options
  • Save andrasguseo/3a514035dc6d300cbf6851677e429786 to your computer and use it in GitHub Desktop.
Save andrasguseo/3a514035dc6d300cbf6851677e429786 to your computer and use it in GitHub Desktop.
Reformats the output of the event schedule details on the list view
<?php
/*
* Reformats the output of the event schedule details on the list view
*
* Plugins: The Events Calendar
* Author: Andras Guseo
* Last updated: September 6, 2017
* Last version checked: The Events Calendar 4.5.11
*/
function tec_reformat_event_schedule_details( $value ) {
// If it's not the list view, then don't change a thing
if ( ! tribe_is_list_view() ) return $value;
// Split the event schedule details into an array
$schedule = explode("@", $value);
// Reformat the schedule details
$value = "<span>" . $schedule[0] . "</span><span>" . $schedule[1] . "</span>";
// Give it back
return $value;
}
add_filter('tribe_events_event_schedule_details', 'tec_reformat_event_schedule_details', 10, 4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment