This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EventsListWidget_NewlyAddedEvents { | |
protected $constraints = array( | |
'sidebar_id' => null, | |
'widget_id' => null, | |
'widget_title' => null | |
); | |
public function __construct( array $constraints = array() ) { | |
$this->constraints = array_merge( $this->constraints, $constraints ); | |
add_filter( 'widget_display_callback', array( $this, 'setup' ), 10, 3 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Function to hide end time in list, map, photo, and single event view | |
// NOTE: This will only hide the end time for events that end on the same day | |
add_filter( 'tribe_events_event_schedule_details_formatting', 'remove_end_time', 10, 2); | |
function remove_end_time( $formatting_details ) { | |
$formatting_details['show_end_time'] = 0; | |
return $formatting_details; | |
} | |
// Function to hide end time in Week and Month View Tooltips |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Allows visitors to page forward/backwards in any direction within month view | |
* an "infinite" number of times (ie, outwith the populated range of months). | |
*/ | |
class ContinualMonthViewPagination { | |
protected $tec; | |
public function __construct() { | |
add_filter( 'tribe_events_the_next_month_link', array( $this, 'next_month' ) ); | |
add_filter( 'tribe_events_the_previous_month_link', array( $this, 'previous_month' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param string $url | |
* @param string $type | |
* @return string | |
*/ | |
function modify_month_list_link_urls( $url, $type ) { | |
if ( 'month' === $type ) return str_replace( 'month', 'calendar', $url ); | |
if ( 'list' === $type ) return str_replace( 'list', 'all-events', $url ); | |
if ( 'photo' === $type ) return str_replace( 'photo', 'picture-board', $url ); | |
return $url; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Modify the "bases" used to form event URLs for various views. | |
* | |
* @param array $bases | |
* | |
* @return array | |
*/ | |
function rename_event_view_slugs( $bases ) { | |
if ( isset( $bases['month'] ) ) $bases['month'] = [ 'calendar', 'calendar' ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// We want to adapt the names of views listed within the Tribe Events Bar | |
add_filter( 'tribe-events-bar-views', 'rename_tribe_views_in_selector', 100 ); | |
function rename_tribe_views_in_selector( $views ) { | |
// This lists the original view names you wish to change along | |
// with the substitutes to wish to use in their place | |
$to_change = array( | |
'List' => 'All Events', | |
'Month' => 'Calendar', | |
'Photo' => 'Picture Board', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Change the colour and other properties of the venue widget title */ | |
.tribe-events-countdown-widget h2.widget-title { | |
color: #fa0; | |
transform: rotate( -2deg ); | |
} | |
/** Make the event title uppercase and green */ | |
.tribe-events-countdown-widget .tribe-countdown-text a { | |
color: #10c050; | |
text-transform: uppercase; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Change the colour and other properties of the venue widget title */ | |
.tribe-events-venue-widget h2.widget-title { | |
color: #fa0; | |
transform: rotate( -2deg ); | |
} | |
/** Give the venue name a strong background colour */ | |
.tribe-events-venue-widget .tribe-venue-widget-venue-name { | |
background: black; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Change the background colour of the grid header area */ | |
.tribe_mini_calendar_widget thead, | |
.tribe_mini_calendar_widget .tribe-mini-calendar-nav td { | |
background: lightblue; | |
} | |
/** Change the colour scheme of the days of the week */ | |
.tribe_mini_calendar_widget .tribe-mini-calendar-dayofweek { | |
background: yellow; | |
color: black; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Place a border around the entire widget */ | |
.tribe_mini_calendar_widget { | |
border: 2px solid black; | |
} | |
/** Change the widget title colour and size */ | |
.tribe_mini_calendar_widget h2.widget-title { | |
color: purple; | |
font-size: 30px; | |
} |