Layers_Customize_Font_Control

The Layers Layers Customize Font Control class.

Defined (1)

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

/core/customizer/controls/font.php  
  1. class Layers_Customize_Font_Control extends Layers_Customize_Control { 
  2.  
  3. public $type = 'layers-font'; 
  4.  
  5. public function render_content() { 
  6.  
  7. // Exit if there are no choises 
  8. if ( empty( $this->choices ) ) return; 
  9.  
  10. $form_elements = new Layers_Form_Elements(); 
  11.  
  12. $values = false; ?> 
  13.  
  14. <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(); ?> > 
  15.  
  16. <?php $this->render_history_actions(); ?> 
  17.  
  18. <?php if ( '' != $this->heading_divider ) { ?> 
  19. <?php $this->render_heading_divider( $this->heading_divider ); ?> 
  20. <?php } ?> 
  21.  
  22. <?php if ( '' != $this->label ) { ?> 
  23. <span class="customize-control-title"><?php echo $this->label; ?></span> 
  24. <?php } ?> 
  25.  
  26. <?php if ( '' != $this->subtitle ) : ?> 
  27. <label class="layers-form-row"><?php echo $this->subtitle; ?></label> 
  28. <?php endif; ?> 
  29.  
  30. <div class="layers-form-item layers-font-wrapper"> 
  31. <?php echo $form_elements->input( 
  32. array( 
  33. 'type' => 'select',  
  34. 'label' => ( isset( $this->label ) ? $this->label : '' ),  
  35. 'name' => '' ,  
  36. 'id' => $this->id,  
  37. 'options' => $this->choices,  
  38. 'data' => $this->get_customize_data(),  
  39. ); ?> 
  40. </div> 
  41.  
  42. <div class="description customize-control-description" data-base-url="https://www.google.com/fonts/specimen/"> 
  43. <?php echo sprintf( __( '<em>Click <a href="%1s" target="_blank">here</a> to see this font on Google Fonts.</em>' , 'layerswp' ), 'https://www.google.com/fonts/specimen/' . $this->value() ); ?> 
  44. </div> 
  45. </div> 
  46. <?php