| 1 |
<?php |
| 2 |
namespace NjtNotificationBar\NotificationBar; |
| 3 |
|
| 4 |
defined('ABSPATH') || exit; |
| 5 |
|
| 6 |
class WpCustomControlColorText extends \WP_Customize_Control |
| 7 |
{ |
| 8 |
public $type = 'njtColorText'; |
| 9 |
public function render_content() { |
| 10 |
?> |
| 11 |
<div class="simple-notice-custom-control"> |
| 12 |
<?php if( !empty( $this->label ) ) { ?> |
| 13 |
<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> |
| 14 |
<span id="nj_color_select_text"> |
| 15 |
<div class="wp-picker-container wp-picker-active nj_color_select_picker"> |
| 16 |
<button type="button" class="button nj_color_button_select_bg wp-color-result wp-picker-open" aria-expanded="true" style="<?php echo esc_html('background-color:'.$this->value()); ?>"><span class="nj-color-result-text wp-color-result-text"><?php echo esc_html__('Select Color', 'notibar');?></span></button> |
| 17 |
<span class="wp-picker-input-wrap nj_color_display_picker njt_nofi_none"> |
| 18 |
<label class="nj_color_display_color"> |
| 19 |
<span class="screen-reader-text"><?php echo esc_html( $this->label ); ?></span> |
| 20 |
<input id="_customize-input-njt_nofi_text_color" class="njt_nofi_dp_none nj-color-wp-color-picker wp-color-picker" type="text" value="<?php echo esc_html($this->value()); ?>" data-default="<?php echo esc_html($this->value()); ?>" data-customize-setting-link="njt_nofi_text_color"> |
| 21 |
</label> |
| 22 |
<input type="button" class="button button-small nj_color_button_select_default wp-picker-default" value="<?php echo esc_html__('Default', 'notibar');?>" aria-label="Select default color" /> |
| 23 |
</span> |
| 24 |
</div> |
| 25 |
</span> |
| 26 |
<?php } ?> |
| 27 |
<?php if( !empty( $this->description ) ) { ?> |
| 28 |
<span class="customize-control-description"><?php echo wp_kses_post( $this->description ); ?></span> |
| 29 |
<?php } ?> |
| 30 |
</div> |
| 31 |
<?php |
| 32 |
} |
| 33 |
} |
| 34 |
|
| 35 |
|