Created
March 1, 2017 08:46
-
-
Save elimn/4a8079fa2c45ef074aeb8afe3748f459 to your computer and use it in GitHub Desktop.
Revisions
-
elimn created this gist
Mar 1, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ <?php if ( ! function_exists( 'tribe_body_class_recurring_all' ) ) { /** * Adds a recurring all body class to the recurring all page * * @see body_class */ function tribe_body_class_recurring_all( $classes, $class ) { if ( tribe_events_is_recurring_all() ) { $classes[] = 'tribe-events-recurring-all'; } return $classes; } } if ( ! function_exists( 'tribe_events_is_recurring_all' ) ) { /** * Checks if this is the /all/ page created for recurring events * * @return bool */ function tribe_events_is_recurring_all() { $is_page = ( get_query_var( 'eventDisplay' ) === 'all' ); return apply_filters( 'tribe_events_is_recurring_all', $is_page ); } } add_filter( 'body_class', 'tribe_body_class_recurring_all', 10, 2 );