Skip to content

Commit a9118a8

Browse files
committed
- fixes a bug where date picker fields were being returned incorrectly in some cases
1 parent 5c2b464 commit a9118a8

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/FieldConfig.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -541,20 +541,6 @@ static function ( $opt ) {
541541
$value = apply_filters( 'the_content', $value );
542542
}
543543

544-
if ( ! empty( $acf_field_config['type'] ) && in_array(
545-
$acf_field_config['type'],
546-
[
547-
'date_picker',
548-
'time_picker',
549-
'date_time_picker',
550-
],
551-
true
552-
) ) {
553-
if ( ! empty( $value ) && ! empty( $acf_field_config['return_format'] ) ) {
554-
$value = gmdate( $acf_field_config['return_format'], strtotime( $value ) );
555-
}
556-
}
557-
558544
if ( ! empty( $acf_field_config['type'] ) && in_array( $acf_field_config['type'], [ 'number', 'range' ], true ) ) {
559545
$value = (float) $value ?: null;
560546
}

0 commit comments

Comments
 (0)