AdminPageSetting.Time.class.php
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Register, display and save a text field setting in the admin menu |
| 5 | * |
| 6 | * @since 2.5.5 |
| 7 | * @package Simple Admin Pages |
| 8 | */ |
| 9 | |
| 10 | class sapAdminPageSettingTime_2_6_19 extends sapAdminPageSetting_2_6_19 { |
| 11 | |
| 12 | public $sanitize_callback = 'sanitize_text_field'; |
| 13 | |
| 14 | /** |
| 15 | * Placeholder string for the input field |
| 16 | * @since 2.5.5 |
| 17 | */ |
| 18 | public $placeholder = ''; |
| 19 | |
| 20 | /** |
| 21 | * Display this setting |
| 22 | * @since 2.5.5 |
| 23 | */ |
| 24 | public function display_setting() { |
| 25 | ?> |
| 26 | |
| 27 | <input name="<?php echo esc_attr( $this->get_input_name() ); ?>" type="time" id="<?php echo esc_attr( $this->get_input_name() ); ?>" value="<?php echo esc_attr( $this->value ); ?>"<?php echo !empty( $this->placeholder ) ? ' placeholder="' . esc_attr( $this->placeholder ) . '"' : ''; ?> class="regular-text" <?php echo ( $this->disabled ? 'disabled' : ''); ?> /> |
| 28 | |
| 29 | <?php $this->display_disabled(); ?> |
| 30 | |
| 31 | <?php |
| 32 | |
| 33 | $this->display_description(); |
| 34 | |
| 35 | } |
| 36 | |
| 37 | } |
| 38 |