Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Changes the datetime format used for the datetime picker inside the event editor.
<?php
/**
* Changes the datetime format used for the datetime picker inside the event editor.
*
* @param array $defaults The current defaults.
*/
function change_event_editor_datetime_format( $defaults ) {
$defaults[ 'datetime_format' ] = 'Y-m-d h:i A';
return $defaults;
}
add_filter( 'wpt/event_editor/defaults', 'change_event_editor_datetime_format', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.