| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Class Pix_Customize_Radio_HTML_Control |
| 5 |
*/ |
| 6 |
class Pix_Customize_Radio_HTML_Control extends Pix_Customize_Control { |
| 7 |
public $type = 'radio_html'; |
| 8 |
public $description = null; |
| 9 |
|
| 10 |
/** |
| 11 |
* Render the control's content. |
| 12 |
*/ |
| 13 |
public function render_content() { ?> |
| 14 |
|
| 15 |
<label> |
| 16 |
<?php if ( ! empty( $this->label ) ) { ?> |
| 17 |
<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> |
| 18 |
<?php } ?> |
| 19 |
|
| 20 |
<div class="customify_radio_html"> |
| 21 |
<?php |
| 22 |
foreach ( $this->choices as $value => $html ) { ?> |
| 23 |
<label> |
| 24 |
<input |
| 25 |
type="radio" |
| 26 |
name="<?php echo esc_attr( $this->setting->id ); ?>" |
| 27 |
value="<?php echo esc_attr( $value ); ?>" |
| 28 |
<?php $this->link(); ?> |
| 29 |
<?php echo selected( $this->value(), $value, false ); ?> |
| 30 |
/> |
| 31 |
<div><?php echo $html; ?></div> |
| 32 |
</label> |
| 33 |
<?php } ?> |
| 34 |
</div> |
| 35 |
|
| 36 |
<?php if ( ! empty( $this->description ) ) { ?> |
| 37 |
<span class="description customize-control-description"><?php echo $this->description; ?></span> |
| 38 |
<?php } ?> |
| 39 |
</label> |
| 40 |
|
| 41 |
<?php } |
| 42 |
} |
| 43 |
|