notices
6 days ago
tabbed-view
6 days ago
widgets
6 days ago
app-shop.php
6 days ago
event-log.php
6 days ago
tribe-options-display.php
6 days ago
tribe-options-general.php
6 days ago
tribe-options-help.php
6 days ago
tribe-options-licenses.php
6 days ago
tribe-options-network.php
6 days ago
tribe-options-display.php
63 lines
| 1 | <?php |
| 2 | |
| 3 | $sample_date = strtotime( 'January 15 ' . date( 'Y' ) ); |
| 4 | |
| 5 | $displayTab = [ |
| 6 | 'priority' => 20, |
| 7 | 'fields' => |
| 8 | /** |
| 9 | * Filter the fields available on the display settings tab |
| 10 | * |
| 11 | * @param array $fields a nested associative array of fields & field info passed to Tribe__Field |
| 12 | * |
| 13 | * @see Tribe__Field |
| 14 | */ |
| 15 | apply_filters( |
| 16 | 'tribe_display_settings_tab_fields', [ |
| 17 | 'tribe-form-content-start' => [ |
| 18 | 'type' => 'html', |
| 19 | 'html' => '<div class="tribe-settings-form-wrap">', |
| 20 | ], |
| 21 | 'tribeEventsDateFormatSettingsTitle' => [ |
| 22 | 'type' => 'html', |
| 23 | 'html' => '<h3>' . esc_html__( 'Date Format Settings', 'tribe-common' ) . '</h3>', |
| 24 | ], |
| 25 | 'tribeEventsDateFormatExplanation' => [ |
| 26 | 'type' => 'html', |
| 27 | 'html' => '<p>' |
| 28 | . sprintf( |
| 29 | __( 'The following three fields accept the date format options available to the PHP %1$s function. <a href="%2$s" target="_blank">Learn how to make your own date format here</a>.', 'tribe-common' ), |
| 30 | '<code>date()</code>', |
| 31 | 'https://wordpress.org/support/article/formatting-date-and-time/' |
| 32 | ) |
| 33 | . '</p>', |
| 34 | ], |
| 35 | 'datepickerFormat' => [ |
| 36 | 'type' => 'dropdown', |
| 37 | 'label' => esc_html__( 'Compact Date Format', 'tribe-common' ), |
| 38 | 'tooltip' => esc_html__( 'Select the date format used for elements with minimal space, such as in datepickers.', 'tribe-common' ), |
| 39 | 'default' => 1, |
| 40 | 'options' => [ |
| 41 | '0' => date( 'Y-m-d', $sample_date ), |
| 42 | '1' => date( 'n/j/Y', $sample_date ), |
| 43 | '2' => date( 'm/d/Y', $sample_date ), |
| 44 | '3' => date( 'j/n/Y', $sample_date ), |
| 45 | '4' => date( 'd/m/Y', $sample_date ), |
| 46 | '5' => date( 'n-j-Y', $sample_date ), |
| 47 | '6' => date( 'm-d-Y', $sample_date ), |
| 48 | '7' => date( 'j-n-Y', $sample_date ), |
| 49 | '8' => date( 'd-m-Y', $sample_date ), |
| 50 | '9' => date( 'Y.m.d', $sample_date ), |
| 51 | '10' => date( 'm.d.Y', $sample_date ), |
| 52 | '11' => date( 'd.m.Y', $sample_date ), |
| 53 | ], |
| 54 | 'validation_type' => 'options', |
| 55 | ], |
| 56 | 'tribe-form-content-end' => [ |
| 57 | 'type' => 'html', |
| 58 | 'html' => '</div>', |
| 59 | ], |
| 60 | ] |
| 61 | ), |
| 62 | ]; |
| 63 |