PluginProbe
Customify / 1.5.2
Customify v1.5.2
2.10.9 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.7.1 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.6.0 1.6.0.1 1.6.5 1.7.0 1.7.1 All 77 releases
customify / features / customizer / controls / class-Pix_Customize_Select2_Control.php

class-Pix_Customize_Select2_Control.php in Customify 1.5.2, at features/customizer/controls/class-Pix_Customize_Select2_Control.php

37 lines 922 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Class Pix_Customize_Select2_Control
5 * A simple Select2 Control
6 */
7 class Pix_Customize_Select2_Control extends Pix_Customize_Control {
8 public $type = 'select2';
9
10 /**
11 * Render the control's content.
12 *
13 * @since 3.4.0
14 */
15 public function render_content() {
16 ?>
17 <label>
18 <?php if ( ! empty( $this->label ) ) : ?>
19 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
20 <?php endif; ?>
21
22 <select <?php $this->link(); ?> class="customify_select2">
23 <?php
24 foreach ( $this->choices as $value => $label )
25 echo '<option value="' . esc_attr( $value ) . '"' . selected( $this->value(), $value, false ) . '>' . $label . '</option>';
26 ?>
27 </select>
28
29 <?php if ( ! empty( $this->description ) ) : ?>
30 <span class="description customize-control-description"><?php echo $this->description; ?></span>
31 <?php endif; ?>
32 </label>
33 <?php
34
35 }
36 }
37