Catchresponsive_Customize_Dropdown_Categories_Control

The Catch Responsive Catchresponsive Customize Dropdown Categories Control class.

Defined (1)

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

/inc/customizer-includes/catchresponsive-customizer-custom-controls.php  
  1. class Catchresponsive_Customize_Dropdown_Categories_Control extends WP_Customize_Control { 
  2. public $type = 'dropdown-categories'; 
  3.  
  4. public $name; 
  5.  
  6. public function render_content() { 
  7. $dropdown = wp_dropdown_categories( 
  8. array( 
  9. 'name' => $this->name,  
  10. 'echo' => 0,  
  11. 'hide_empty' => false,  
  12. 'show_option_none' => false,  
  13. 'hide_if_empty' => false,  
  14. ); 
  15.  
  16. $dropdown = str_replace('<select', '<select multiple = "multiple" style = "height:95px;" ' . $this->get_link(), $dropdown ); 
  17.  
  18. printf( 
  19. '<label class="customize-control-select"><span class="customize-control-title">%s</span> %s</label>',  
  20. $this->label,  
  21. $dropdown 
  22. ); 
  23.  
  24. echo '<p class="description">'. __( 'Hold down the Ctrl (windows) / Command (Mac) button to select multiple options.', 'catch-responsive' ) . '</p>';