Skip to content

Instantly share code, notes, and snippets.

@slimndap
Created December 29, 2017 10:41
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 slimndap/0d40867e95c55e760652069f925fcf6b to your computer and use it in GitHub Desktop.
Save slimndap/0d40867e95c55e760652069f925fcf6b to your computer and use it in GitHub Desktop.
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