Created
April 19, 2016 03:37
-
-
Save elimn/959488d4f35ecc97a4be9bd77e9a6f2f to your computer and use it in GitHub Desktop.
MT | TEC | Tick first upcoming by default in front-end
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 | |
| /* | |
| * Checks the front-end box "Show only the first upcoming instance of recurring events" by default | |
| */ | |
| function tribe_subsequent_recurrence_default( $option, $name, $default ) { | |
| if ( $name === 'hideSubsequentRecurrencesDefault' && ! is_admin() ) $option = true; | |
| return $option; | |
| } | |
| add_filter( 'tribe_get_option', 'tribe_subsequent_recurrence_default', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment