| @@ 19-49 (lines=31) @@ | ||
| 16 | * @since 3.18.0 |
|
| 17 | * @package Wordlift |
|
| 18 | */ |
|
| 19 | class Wordlift_Metabox_Field_Integer extends WL_Metabox_Field { |
|
| 20 | /** |
|
| 21 | * @inheritdoc |
|
| 22 | */ |
|
| 23 | public function html_input( $text ) { |
|
| 24 | @ob_start(); |
|
| 25 | ?> |
|
| 26 | <div class="wl-input-wrapper"> |
|
| 27 | <input |
|
| 28 | type="number" |
|
| 29 | id="<?php echo esc_attr( $this->meta_name ); ?>" |
|
| 30 | class="<?php echo esc_attr( $this->meta_name ); ?>" |
|
| 31 | value="<?php echo esc_attr( $text ) ?>" |
|
| 32 | name="wl_metaboxes[<?php echo $this->meta_name; ?>][]" |
|
| 33 | style="width:88%" |
|
| 34 | min="0" |
|
| 35 | /> |
|
| 36 | ||
| 37 | <button class="button wl-remove-input wl-button" type="button"> |
|
| 38 | <?php esc_html_e( 'Remove', 'wordlift' ); ?> |
|
| 39 | </button> |
|
| 40 | ||
| 41 | <div class="wl-input-notice"></div> |
|
| 42 | </div> |
|
| 43 | ||
| 44 | <?php |
|
| 45 | $html = ob_get_clean(); |
|
| 46 | ||
| 47 | return $html; |
|
| 48 | } |
|
| 49 | } |
|
| 50 | ||
| @@ 19-44 (lines=26) @@ | ||
| 16 | * @since 3.14.0 |
|
| 17 | * @package Wordlift |
|
| 18 | */ |
|
| 19 | class Wordlift_Metabox_Field_Multiline extends WL_Metabox_Field { |
|
| 20 | ||
| 21 | /** |
|
| 22 | * @inheritdoc |
|
| 23 | */ |
|
| 24 | public function html_input( $text ) { |
|
| 25 | @ob_start(); |
|
| 26 | ?> |
|
| 27 | <div class="wl-input-wrapper"> |
|
| 28 | <textarea |
|
| 29 | id="<?php echo esc_attr( $this->meta_name ) ?>" |
|
| 30 | class="<?php echo esc_attr( $this->meta_name ) ?>" |
|
| 31 | name="wl_metaboxes[<?php echo $this->meta_name ?>][]" |
|
| 32 | style="width:88%" |
|
| 33 | ><?php echo esc_textarea( $text ) ?></textarea> |
|
| 34 | ||
| 35 | <button class="button wl-remove-input wl-button" type="button"> |
|
| 36 | <?php esc_html_e( 'Remove', 'wordlift' ); ?> |
|
| 37 | </button> |
|
| 38 | </div> |
|
| 39 | <?php |
|
| 40 | $html = ob_get_clean(); |
|
| 41 | ||
| 42 | return $html; |
|
| 43 | } |
|
| 44 | } |
|
| 45 | ||