Created
December 29, 2017 10:41
-
-
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.
This file contains 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 | |
/** | |
* 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