catchresponsive_upgrade_pro_customize_section_pro

Pro customizer section.

Defined (1)

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

/inc/customizer-includes/upgrade-button/section-pro.php  
  1. class catchresponsive_upgrade_pro_customize_section_pro extends WP_Customize_Section { 
  2.  
  3. /** 
  4. * The type of customize section being rendered. 
  5. * @since 1.0.0 
  6. * @access public 
  7. * @var string 
  8. */ 
  9. public $type = 'upgrade-button'; 
  10.  
  11. /** 
  12. * Custom button text to output. 
  13. * @since 1.0.0 
  14. * @access public 
  15. * @var string 
  16. */ 
  17. public $pro_text = ''; 
  18.  
  19. /** 
  20. * Custom pro button URL. 
  21. * @since 1.0.0 
  22. * @access public 
  23. * @var string 
  24. */ 
  25. public $pro_url = ''; 
  26.  
  27. /** 
  28. * Add custom parameters to pass to the JS via JSON. 
  29. * @since 1.0.0 
  30. * @access public 
  31. * @return void 
  32. */ 
  33. public function json() { 
  34. $json = parent::json(); 
  35.  
  36. $json['pro_text'] = $this->pro_text; 
  37. $json['pro_url'] = esc_url( $this->pro_url ); 
  38.  
  39. return $json; 
  40.  
  41. /** 
  42. * Outputs the Underscore.js template. 
  43. * @since 1.0.0 
  44. * @access public 
  45. * @return void 
  46. */ 
  47. protected function render_template() { ?> 
  48.  
  49. <li id="accordion-section-{{ data.id }}" class="accordion-section control-section control-section-{{ data.type }} cannot-expand"> 
  50.  
  51. <h3 class="accordion-section-title"> 
  52. {{ data.title }} 
  53.  
  54. <# if ( data.pro_text && data.pro_url ) { #> 
  55. <a href="{{ data.pro_url }}" class="button button-secondary alignright" target="_blank">{{ data.pro_text }}</a> 
  56. <# } #> 
  57. </h3> 
  58. </li> 
  59. <?php }