# customify/1.2.7/features/customizer/controls/class-Pix_Customize_Select2_Control.php

Customify, version 1.2.7. 37 lines.

- Page: https://pluginprobe.com/plugins/customify/1.2.7/code/features/customizer/controls/class-Pix_Customize_Select2_Control.php
- Raw: https://pluginprobe.com/plugins/customify/1.2.7/raw/features/customizer/controls/class-Pix_Customize_Select2_Control.php
- Modified: 2016-01-25T10:48:52+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/customify/1.2.7/code/features/customizer/controls/class-Pix_Customize_Select2_Control.php#L10-L20`.

```php
<?php

/**
 * Class Pix_Customize_Select2_Control
 * A simple Select2 Control
 */
class Pix_Customize_Select2_Control extends Pix_Customize_Control {
	public $type    = 'select2';

	/**
	 * Render the control's content.
	 *
	 * @since 3.4.0
	 */
	public function render_content() {
		?>
		<label>
			<?php if ( ! empty( $this->label ) ) : ?>
				<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
			<?php endif; ?>

			<select <?php $this->link(); ?> class="customify_select2">
				<?php
				foreach ( $this->choices as $value => $label )
					echo '<option value="' . esc_attr( $value ) . '"' . selected( $this->value(), $value, false ) . '>' . $label . '</option>';
				?>
			</select>
			
			<?php if ( ! empty( $this->description ) ) : ?>
				<span class="description customize-control-description"><?php echo $this->description; ?></span>
			<?php endif; ?>
		</label>
	<?php

	}
}

```
