| @@ 120-131 (lines=12) @@ | ||
| 117 | ); |
|
| 118 | ||
| 119 | // Check if PHP DateTime::createFromFormat exists for additional supported formats |
|
| 120 | if ( method_exists( 'DateTime', 'createFromFormat' ) || apply_filters( 'pods_form_ui_field_datetime_custom_formatter', false ) ) { |
|
| 121 | $options[ static::$type . '_format' ]['data'] = array_merge( |
|
| 122 | $options[ static::$type . '_format' ]['data'], array( |
|
| 123 | 'dmy' => date_i18n( 'd/m/Y' ), |
|
| 124 | 'dmy_dash' => date_i18n( 'd-m-Y' ), |
|
| 125 | 'dmy_dot' => date_i18n( 'd.m.Y' ), |
|
| 126 | 'dMy' => date_i18n( 'd/M/Y' ), |
|
| 127 | 'dMy_dash' => date_i18n( 'd-M-Y' ), |
|
| 128 | ) |
|
| 129 | ); |
|
| 130 | } |
|
| 131 | ||
| 132 | $options[ static::$type . '_format' ]['data'] = apply_filters( 'pods_form_ui_field_date_format_options', $options[ static::$type . '_format' ]['data'] ); |
|
| 133 | $options[ static::$type . '_format' ]['default'] = apply_filters( 'pods_form_ui_field_date_format_default', $options[ static::$type . '_format' ]['default'] ); |
|
| 134 | ||
| @@ 186-197 (lines=12) @@ | ||
| 183 | ); |
|
| 184 | ||
| 185 | // Check if PHP DateTime::createFromFormat exists for additional supported formats |
|
| 186 | if ( method_exists( 'DateTime', 'createFromFormat' ) || apply_filters( 'pods_form_ui_field_datetime_custom_formatter', false ) ) { |
|
| 187 | $options[ static::$type . '_format' ]['data'] = array_merge( |
|
| 188 | $options[ static::$type . '_format' ]['data'], array( |
|
| 189 | 'dmy' => date_i18n( 'd/m/Y' ), |
|
| 190 | 'dmy_dash' => date_i18n( 'd-m-Y' ), |
|
| 191 | 'dmy_dot' => date_i18n( 'd.m.Y' ), |
|
| 192 | 'dMy' => date_i18n( 'd/M/Y' ), |
|
| 193 | 'dMy_dash' => date_i18n( 'd-M-Y' ), |
|
| 194 | ) |
|
| 195 | ); |
|
| 196 | } |
|
| 197 | ||
| 198 | $options[ static::$type . '_format' ]['data'] = apply_filters( 'pods_form_ui_field_date_format_options', $options[ static::$type . '_format' ]['data'] ); |
|
| 199 | $options[ static::$type . '_format' ]['default'] = apply_filters( 'pods_form_ui_field_date_format_default', $options[ static::$type . '_format' ]['default'] ); |
|
| 200 | ||