Created
October 7, 2015 23:19
-
-
Save cliffordp/5c6fae0071a07b2e2e73 to your computer and use it in GitHub Desktop.
Override Mini-Calendar Widget -- output month name abbreviation instead of day name abbreviation -- e.g. change "Sat" to "Oct"
This file contains hidden or 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 | |
| // http://theeventscalendar.com/support/forums/topic/events-list-widget-not-showing-the-month-just-day-name-and-day-number/ | |
| // | |
| // Mini-Calendar Widget: /wp-content/plugins/events-calendar-pro/src/views/pro/widgets/modules/single-event.php | |
| // output month name abbreviation instead of day name abbreviation | |
| // e.g. change "Sat" to "Oct" | |
| add_filter( 'tribe-mini_helper_tribe_events_ajax_list_dayname', 'cliff_1011625_mini_cal_month_instead_of_day_of_week' ); | |
| function cliff_1011625_mini_cal_month_instead_of_day_of_week( $postDate ) { | |
| return date_i18n( 'M', strtotime( $postDate ) ); // changing from 'D' to 'M' -- could also use any other date format from http://php.net/manual/en/function.date.php | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment