@@ -51,13 +51,13 @@ discard block |
||
| 51 | 51 | /** |
| 52 | 52 | * {@inheritdoc} |
| 53 | 53 | */ |
| 54 | - public function __construct( $args, $id, $type ) { |
|
| 55 | - parent::__construct( $args, $id, $type ); |
|
| 54 | + public function __construct($args, $id, $type) { |
|
| 55 | + parent::__construct($args, $id, $type); |
|
| 56 | 56 | |
| 57 | 57 | $this->no_calendar = false; |
| 58 | 58 | |
| 59 | 59 | // Distinguish between date and datetime |
| 60 | - if ( isset( $this->raw_custom_field['export_type'] ) && 'xsd:dateTime' === $this->raw_custom_field['export_type'] ) { |
|
| 60 | + if (isset($this->raw_custom_field['export_type']) && 'xsd:dateTime' === $this->raw_custom_field['export_type']) { |
|
| 61 | 61 | $this->date_format = 'Y/m/d H:i'; |
| 62 | 62 | $this->timepicker = true; |
| 63 | 63 | } else { |
@@ -72,23 +72,23 @@ discard block |
||
| 72 | 72 | * |
| 73 | 73 | * @return string |
| 74 | 74 | */ |
| 75 | - public function html_input( $date ) { |
|
| 75 | + public function html_input($date) { |
|
| 76 | 76 | |
| 77 | - $this->log->debug( "Creating date input with date value $date..." ); |
|
| 77 | + $this->log->debug("Creating date input with date value $date..."); |
|
| 78 | 78 | |
| 79 | 79 | ob_start(); |
| 80 | 80 | ?> |
| 81 | 81 | <div class="wl-input-wrapper"> |
| 82 | 82 | <input |
| 83 | 83 | type="text" |
| 84 | - class="<?php echo esc_attr( $this->meta_name ); ?>" |
|
| 85 | - name="wl_metaboxes[<?php echo esc_attr( $this->meta_name ); ?>][]" |
|
| 86 | - value="<?php echo esc_attr( $date ); ?>" |
|
| 84 | + class="<?php echo esc_attr($this->meta_name); ?>" |
|
| 85 | + name="wl_metaboxes[<?php echo esc_attr($this->meta_name); ?>][]" |
|
| 86 | + value="<?php echo esc_attr($date); ?>" |
|
| 87 | 87 | style="width:88%" |
| 88 | 88 | /> |
| 89 | 89 | |
| 90 | 90 | <button class="button wl-remove-input wl-button" type="button"> |
| 91 | - <?php esc_html_e( 'Remove', 'wordlift' ); ?> |
|
| 91 | + <?php esc_html_e('Remove', 'wordlift'); ?> |
|
| 92 | 92 | </button> |
| 93 | 93 | </div> |
| 94 | 94 | <?php |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | <script type='text/javascript'> |
| 121 | 121 | (function ($) { |
| 122 | 122 | $(function () { |
| 123 | - $('.<?php echo esc_js( $this->meta_name ); ?>[type=text]').flatpickr(<?php echo wp_json_encode( $js ); ?>); |
|
| 123 | + $('.<?php echo esc_js($this->meta_name); ?>[type=text]').flatpickr(<?php echo wp_json_encode($js); ?>); |
|
| 124 | 124 | }); |
| 125 | 125 | })(jQuery); |
| 126 | 126 | </script> |