diff --git a/src/wp-admin/options.php b/src/wp-admin/options.php
index 84ac775fd43d8a5a5e7543029825d3345e4e3be9..2d607ebbeb0fac4289cb097e67e5ccdab08c60bb 100644
a
|
b
|
if ( 'update' === $action ) { // We are saving settings sent from a settings pag |
265 | 265 | if ( ! empty( $_POST['date_format'] ) && isset( $_POST['date_format_custom'] ) |
266 | 266 | && '\c\u\s\t\o\m' === wp_unslash( $_POST['date_format'] ) |
267 | 267 | ) { |
268 | | $_POST['date_format'] = $_POST['date_format_custom']; |
| 268 | $_POST['date_format'] = !empty( $_POST['date_format_custom'] ) ? $_POST['date_format_custom'] : 'F j, Y'; |
269 | 269 | } |
270 | 270 | |
271 | 271 | if ( ! empty( $_POST['time_format'] ) && isset( $_POST['time_format_custom'] ) |
272 | 272 | && '\c\u\s\t\o\m' === wp_unslash( $_POST['time_format'] ) |
273 | 273 | ) { |
274 | | $_POST['time_format'] = $_POST['time_format_custom']; |
| 274 | $_POST['time_format'] = !empty( $_POST['time_format_custom'] ) ? $_POST['time_format_custom'] : 'g:i a'; |
275 | 275 | } |
276 | 276 | |
277 | 277 | // Map UTC+- timezones to gmt_offsets and set timezone_string to empty. |