| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Class Pix_Customize_Text_Control |
| 5 |
* A simple Text Control |
| 6 |
*/ |
| 7 |
class Pix_Customize_Text_Control extends Pix_Customize_Control { |
| 8 |
public $type = 'text'; |
| 9 |
public $live = false; |
| 10 |
|
| 11 |
/** |
| 12 |
* Render the control's content. |
| 13 |
* |
| 14 |
* @since 3.4.0 |
| 15 |
*/ |
| 16 |
public function render_content() { |
| 17 |
// here we need an array of classes which should be affected by the live preview |
| 18 |
// if ( ! empty( $this->live ) && is_array( $this->live ) ) { |
| 19 |
// $this->input_attrs['data-live_preview_classes'] = implode( ',', $this->live ); |
| 20 |
// $this->input_attrs['class'] = 'customify_text_live_preview'; |
| 21 |
// } ?> |
| 22 |
<label> |
| 23 |
<?php if ( ! empty( $this->label ) ) : ?> |
| 24 |
<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> |
| 25 |
<?php endif; ?> |
| 26 |
<input type="<?php echo esc_attr( $this->type ); ?>" <?php $this->input_attrs(); ?> value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); ?> /> |
| 27 |
<?php if ( ! empty( $this->description ) ) : ?> |
| 28 |
<span class="description customize-control-description"><?php echo $this->description; ?></span> |
| 29 |
<?php endif; ?> |
| 30 |
</label> |
| 31 |
<?php |
| 32 |
|
| 33 |
} |
| 34 |
} |
| 35 |
|