Skip to content

Instantly share code, notes, and snippets.

@nefeline
Last active November 24, 2017 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nefeline/aceabe1f914a0583340396d25c0b2308 to your computer and use it in GitHub Desktop.
Save nefeline/aceabe1f914a0583340396d25c0b2308 to your computer and use it in GitHub Desktop.
<?php
/**
* This snippet changes the default start and end times for both The Events Calendar and Community Events.
*/
function new_default_time( $default, $type ) {
if ( 'start' === $type ) {
return '09:00';
} elseif ( 'end' === $type ) {
return '22:00';
}
return $default;
}
add_action( 'tribe_events_meta_box_timepicker_default', 'new_default_time', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment