/core/customizer/controls/text.php

  1. <?php /** 
  2. * Text 
  3. * 
  4. * This file is used to register and display the custom Layers Text 
  5. * 
  6. * @package Layers 
  7. * @since Layers 1.0.0 
  8. */ 
  9.  
  10. if( !class_exists( 'Layers_Customize_Text_Control' ) ) { 
  11.  
  12. class Layers_Customize_Text_Control extends Layers_Customize_Control { 
  13.  
  14. public $type = 'layers-text'; 
  15.  
  16. public function render_content() { 
  17.  
  18. $form_elements = new Layers_Form_Elements(); 
  19.  
  20. $values = false; ?> 
  21.  
  22. <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(); ?> > 
  23.  
  24. <?php $this->render_history_actions(); ?> 
  25.  
  26. <?php if ( '' != $this->heading_divider ) { ?> 
  27. <?php $this->render_heading_divider( $this->heading_divider ); ?> 
  28. <?php } ?> 
  29.  
  30. <?php if ( '' != $this->label ) { ?> 
  31. <span class="customize-control-title"><?php echo $this->label; ?></span> 
  32. <?php } ?> 
  33.  
  34. <?php if ( '' != $this->description ) : ?> 
  35. <div class="description customize-control-description"> 
  36. <?php echo $this->description; ?> 
  37. </div> 
  38. <?php endif; ?> 
  39.  
  40. <?php if ( '' != $this->subtitle ) : ?> 
  41. <label class="layers-form-row"><?php echo $this->subtitle; ?></label> 
  42. <?php endif; ?> 
  43.  
  44. <div class="layers-form-item <?php echo ( $this->colspan ) ? esc_attr( "layers-column-flush layers-span-{$this->colspan}" ) : '' ?>"> 
  45. <?php echo $form_elements->input( 
  46. array( 
  47. 'type' => 'text',  
  48. 'label' => ( isset( $this->label ) ? $this->label : '' ),  
  49. 'name' => '' ,  
  50. 'id' => $this->id,  
  51. 'value' => stripslashes( $this->value() ),  
  52. 'data' => $this->get_customize_data(),  
  53. 'placeholder' => $this->placeholder,  
  54. ); ?> 
  55. </div> 
  56.  
  57. </div> 
  58. <?php 
.