Layers_Customize_Select_Icon_Control

The Layers Layers Customize Select Icon Control class.

Defined (1)

The class is defined in the following location(s).

/core/customizer/controls/select-icons.php  
  1. class Layers_Customize_Select_Icon_Control extends Layers_Customize_Control { 
  2.  
  3. public $type = 'layers-select-icons'; 
  4.  
  5. public function render_content() { 
  6.  
  7. // Exit if there are no choises 
  8. if ( empty( $this->choices ) ) return; 
  9.  
  10. $name = '_customize-radio-' . $this->id; ?> 
  11.  
  12. <div id="layers-customize-control-<?php echo esc_attr( $this->id ); ?>" class="l_option-customize-control l_option-customize-control-<?php echo esc_attr( str_replace( 'layers-', '', $this->type ) ); ?> <?php echo esc_attr( $this->class ); ?>" <?php echo $this->get_linked_data(); ?> > 
  13.  
  14. <?php $this->render_history_actions(); ?> 
  15.  
  16. <?php if ( '' != $this->heading_divider ) { ?> 
  17. <?php $this->render_heading_divider( $this->heading_divider ); ?> 
  18. <?php } ?> 
  19.  
  20. <?php if ( '' != $this->label ) { ?> 
  21. <span class="customize-control-title"><?php echo $this->label; ?></span> 
  22. <?php } ?> 
  23.  
  24. <?php if ( '' != $this->description ) : ?> 
  25. <div class="description customize-control-description"> 
  26. <?php echo $this->description; ?> 
  27. </div> 
  28. <?php endif; ?> 
  29.  
  30. <?php if ( '' != $this->subtitle ) : ?> 
  31. <div class="layers-form-row"><?php echo $this->subtitle; ?></div> 
  32. <?php endif; ?> 
  33.  
  34. <ul class="layers-visuals-wrapper layers-visuals-inline layers-clearfix"> 
  35. <?php foreach ( $this->choices as $key => $value ) : 
  36.  
  37. if ( is_array( $value ) ) { 
  38. $label = $value['name']; 
  39. $class = $value['class']; 
  40. else { 
  41. $label = $value; 
  42. $class = "icon-{$key}"; 
  43. ?> 
  44. <li class="layers-visuals-item <?php if( $key == $this->value() ) echo 'layers-active'; ?>"> 
  45. <label class="layers-icon-wrapper layers-select-images"> 
  46. <span class="<?php echo $class; ?>"></span> 
  47. <span class="layers-icon-description"> 
  48. <?php echo $label; ?> 
  49. </span> 
  50. <input class="l_admin-hide" type="radio" value="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $this->id ); ?>-<?php echo $key; ?>" name="<?php echo esc_attr( $name ); ?>" <?php $this->link(); checked( $this->value(), $key ); ?> /> 
  51. </label> 
  52. </li> 
  53. <?php endforeach; ?> 
  54. </ul> 
  55.  
  56. </div> 
  57. <?php