| @@ -2,20 +2,22 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * Date custombox |
| 4 | 4 | * |
| 5 | 5 | * @package event-post |
| 6 | - * @version 5.10.2 | |
| 6 | + * @version 6.1.2 | |
| 7 | 7 | * @since 5.3.1 |
| 8 | 8 | */ |
| 9 | + | |
| 10 | +if ( ! defined( 'ABSPATH' ) ) exit; | |
| 9 | 11 | ?> |
| 10 | 12 | <div class="eventpost-misc-pub-section"> |
| 11 | 13 | <p> |
| 12 | - <label for="<?php esc_attr_e($this->META_STATUS); ?>"> | |
| 14 | + <label for="<?php echo esc_attr($this->META_STATUS); ?>"> | |
| 13 | 15 | <?php esc_attr_e('Status:', 'event-post') ?> |
| 14 | - <select name="<?php esc_attr_e($this->META_STATUS); ?>" id="<?php esc_attr_e($this->META_STATUS); ?>"> | |
| 16 | + <select name="<?php echo esc_attr($this->META_STATUS); ?>" id="<?php echo esc_attr($this->META_STATUS); ?>"> | |
| 15 | 17 | <option value=""></option> |
| 16 | 18 | <?php foreach ($this->statuses as $status_name => $status_label): ?> |
| 17 | - <option value="<?php esc_attr_e($status_name); ?>" <?php selected($status_name, $event->status, true); ?>><?php esc_attr_e($status_label); ?></option> | |
| 19 | + <option value="<?php echo esc_attr($status_name); ?>" <?php selected($status_name, $event->status, true); ?>><?php echo esc_html($status_label); ?></option> | |
| 18 | 20 | <?php endforeach; ?> |
| 19 | 21 | </select> |
| 20 | 22 | </label> |
| 21 | 23 | </p> |
| @@ -21,49 +23,49 @@ | ||
| 21 | 23 | </p> |
| 22 | 24 | <p> |
| 23 | 25 | <label> |
| 24 | 26 | <input type="checkbox" id="event-post-date-all-day" <?php checked( $event->time_start && $event->time_end && date('H:i:s', $event->time_start) == '00:00:00' && date('H:i:s', $event->time_end) == '00:00:00', true, true); ?>> |
| 25 | - <?php esc_attr_e('All day event', 'event-post') ?> | |
| 27 | + <?php esc_html_e('All day event', 'event-post') ?> | |
| 26 | 28 | </label> |
| 27 | 29 | </p> |
| 28 | 30 | <p> |
| 29 | 31 | <span class="dashicons dashicons-calendar eventpost-edit-icon"></span> |
| 30 | - <label for="<?php esc_attr_e($this->META_START); ?>_date"> | |
| 32 | + <label for="<?php echo esc_attr($this->META_START); ?>_date"> | |
| 31 | 33 | <?php esc_attr_e('Begin:', 'event-post') ?> |
| 32 | - <span id="<?php esc_attr_e($this->META_START); ?>_date_human" class="human_date"> | |
| 34 | + <span id="<?php echo esc_attr($this->META_START); ?>_date_human" class="human_date"> | |
| 33 | 35 | <?php |
| 34 | 36 | if ($event->time_start != '') { |
| 35 | - esc_attr_e( $this->human_date($event->time_start) . (date('H:i', $event->time_start)=='00:00'?'':date(' H:i', $event->time_start))); | |
| 37 | + echo esc_html( $this->human_date($event->time_start) . (date('H:i', $event->time_start)=='00:00'?'':date(' H:i', $event->time_start))); | |
| 36 | 38 | } |
| 37 | 39 | else{ |
| 38 | - esc_attr_e('Pick a date','event-post'); | |
| 40 | + esc_html_e('Pick a date','event-post'); | |
| 39 | 41 | } |
| 40 | 42 | ?> |
| 41 | 43 | </span> |
| 42 | - <input type="<?php esc_attr_e($this->settings['datepicker']=='browser'?'datetime':''); ?>" class="eventpost-datepicker-<?php esc_attr_e($this->settings['datepicker']); ?>" data-lang="<?php esc_attr_e($language); ?>" value="<?php esc_attr_e(substr($start_date,0,16)); ?>" name="<?php esc_attr_e($this->META_START); ?>" id="<?php esc_attr_e($this->META_START); ?>_date"/> | |
| 44 | + <input type="<?php echo esc_attr($this->settings['datepicker']=='browser'?'datetime':''); ?>" class="eventpost-datepicker-<?php echo esc_attr($this->settings['datepicker']); ?>" data-lang="<?php echo esc_attr($language); ?>" value="<?php echo esc_attr(substr($start_date,0,16)); ?>" name="<?php echo esc_attr($this->META_START); ?>" id="<?php echo esc_attr($this->META_START); ?>_date"/> | |
| 43 | 45 | </label> |
| 44 | 46 | </p> |
| 45 | 47 | <p> |
| 46 | 48 | <span class="dashicons dashicons-calendar eventpost-edit-icon"></span> |
| 47 | - <label for="<?php esc_attr_e($this->META_END); ?>_date"> | |
| 49 | + <label for="<?php echo esc_attr($this->META_END); ?>_date"> | |
| 48 | 50 | <?php esc_attr_e('End:', 'event-post') ?> |
| 49 | - <span id="<?php esc_attr_e($this->META_END); ?>_date_human" class="human_date"> | |
| 51 | + <span id="<?php echo esc_attr($this->META_END); ?>_date_human" class="human_date"> | |
| 50 | 52 | <?php |
| 51 | 53 | if ($event->time_start != '') { |
| 52 | - esc_attr_e($this->human_date($event->time_end) . (date('H:i', $event->time_end)=='00:00'?'':date(' H:i', $event->time_end))); | |
| 54 | + echo esc_html( $this->human_date($event->time_end) . (date('H:i', $event->time_end)=='00:00'?'':date(' H:i', $event->time_end))); | |
| 53 | 55 | } |
| 54 | 56 | else{ |
| 55 | - esc_attr_e('Pick a date','event-post'); | |
| 57 | + esc_html_e('Pick a date','event-post'); | |
| 56 | 58 | } |
| 57 | 59 | ?> |
| 58 | 60 | </span> |
| 59 | - <input type="<?php esc_attr_e($this->settings['datepicker']=='browser'?'datetime':''); ?>" class="eventpost-datepicker-<?php esc_attr_e($this->settings['datepicker']); ?>" data-lang="<?php esc_attr_e($language); ?>" value ="<?php esc_attr_e(substr($end_date,0,16)) ?>" name="<?php esc_attr_e($this->META_END); ?>" id="<?php esc_attr_e($this->META_END); ?>_date"/> | |
| 61 | + <input type="<?php echo esc_attr($this->settings['datepicker']=='browser'?'datetime':''); ?>" class="eventpost-datepicker-<?php echo esc_attr($this->settings['datepicker']); ?>" data-lang="<?php echo esc_attr($language); ?>" value ="<?php echo esc_attr(substr($end_date,0,16)) ?>" name="<?php echo esc_attr($this->META_END); ?>" id="<?php echo esc_attr($this->META_END); ?>_date"/> | |
| 60 | 62 | </label> |
| 61 | 63 | </p> |
| 62 | 64 | <p> |
| 63 | - <label for="<?php esc_attr_e($this->META_ORGANIZATION); ?>"> | |
| 65 | + <label for="<?php echo esc_attr($this->META_ORGANIZATION); ?>"> | |
| 64 | 66 | <?php esc_attr_e('Organization:', 'event-post') ?> |
| 65 | - <input type="text" value="<?php esc_attr_e($event->organization); ?>" name="<?php esc_attr_e($this->META_ORGANIZATION); ?>" id="<?php esc_attr_e($this->META_ORGANIZATION); ?>" class="widefat"/> | |
| 67 | + <input type="text" value="<?php echo esc_attr($event->organization); ?>" name="<?php echo esc_attr($this->META_ORGANIZATION); ?>" id="<?php echo esc_attr($this->META_ORGANIZATION); ?>" class="widefat"/> | |
| 66 | 68 | </label> |
| 67 | 69 | </p> |
| 68 | 70 | <p> |
| 69 | 71 | <strong> |
| @@ -69,23 +71,23 @@ | ||
| 69 | 71 | <strong> |
| 70 | 72 | <?php esc_attr_e('Offer:', 'event-post') ?> |
| 71 | 73 | </strong> |
| 72 | 74 | <br> |
| 73 | - <label for="<?php esc_attr_e($this->META_OFFER); ?>_url"> | |
| 75 | + <label for="<?php echo esc_attr($this->META_OFFER); ?>_url"> | |
| 74 | 76 | <?php esc_attr_e('URL:', 'event-post') ?> |
| 75 | - <input type="text" value="<?php esc_attr_e($event->offer['url']); ?>" name="<?php esc_attr_e($this->META_OFFER); ?>_url" id="<?php esc_attr_e($this->META_OFFER); ?>_url" class="widefat"/> | |
| 77 | + <input type="text" value="<?php echo esc_attr($event->offer['url']); ?>" name="<?php echo esc_attr($this->META_OFFER); ?>_url" id="<?php echo esc_attr($this->META_OFFER); ?>_url" class="widefat"/> | |
| 76 | 78 | </label> |
| 77 | - <label for="<?php esc_attr_e($this->META_OFFER); ?>_price"> | |
| 79 | + <label for="<?php echo esc_attr($this->META_OFFER); ?>_price"> | |
| 78 | 80 | <?php esc_attr_e('Price:', 'event-post') ?> |
| 79 | 81 | </label> |
| 80 | 82 | <span style="display: flex; flex-flow: row;"> |
| 81 | - <input type="number" value="<?php esc_attr_e($event->offer['price']); ?>" name="<?php esc_attr_e($this->META_OFFER); ?>_price" id="<?php esc_attr_e($this->META_OFFER); ?>_price" class="widefat"/> | |
| 82 | - <select name="<?php esc_attr_e($this->META_OFFER); ?>_currency" id="<?php esc_attr_e($this->META_OFFER); ?>_currency" style="width: 45px;"> | |
| 83 | + <input type="number" value="<?php echo esc_attr($event->offer['price']); ?>" name="<?php echo esc_attr($this->META_OFFER); ?>_price" id="<?php echo esc_attr($this->META_OFFER); ?>_price" class="widefat"/> | |
| 84 | + <select name="<?php echo esc_attr($this->META_OFFER); ?>_currency" id="<?php echo esc_attr($this->META_OFFER); ?>_currency" style="width: 45px;"> | |
| 83 | 85 | <option value=""></option> |
| 84 | 86 | <?php foreach (EventPost()->currencies as $currency=>$symbol): ?> |
| 85 | - <option value="<?php esc_attr_e($currency); ?>" <?php selected($currency, $event->offer['currency'], true); ?>> | |
| 86 | - <?php esc_attr_e($currency); ?> | |
| 87 | - (<?php esc_attr_e($symbol); ?>) | |
| 87 | + <option value="<?php echo esc_attr($currency); ?>" <?php selected($currency, $event->offer['currency'], true); ?>> | |
| 88 | + <?php echo esc_html($currency); ?> | |
| 89 | + (<?php echo esc_html($symbol); ?>) | |
| 88 | 90 | </option> |
| 89 | 91 | <?php endforeach; ?> |
| 90 | 92 | </select> |
| 91 | 93 | </span> |