WP_Customize_Sidebar_Section

Customizer section representing widget area (sidebar).

Defined (1)

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

/wp-includes/customize/class-wp-customize-sidebar-section.php  
  1. class WP_Customize_Sidebar_Section extends WP_Customize_Section { 
  2.  
  3. /** 
  4. * Type of this section. 
  5. * @since 4.1.0 
  6. * @access public 
  7. * @var string 
  8. */ 
  9. public $type = 'sidebar'; 
  10.  
  11. /** 
  12. * Unique identifier. 
  13. * @since 4.1.0 
  14. * @access public 
  15. * @var string 
  16. */ 
  17. public $sidebar_id; 
  18.  
  19. /** 
  20. * Gather the parameters passed to client JavaScript via JSON. 
  21. * @since 4.1.0 
  22. * @return array The array to be exported to the client as JSON. 
  23. */ 
  24. public function json() { 
  25. $json = parent::json(); 
  26. $json['sidebarId'] = $this->sidebar_id; 
  27. return $json; 
  28.  
  29. /** 
  30. * Whether the current sidebar is rendered on the page. 
  31. * @since 4.1.0 
  32. * @access public 
  33. * @return bool Whether sidebar is rendered. 
  34. */ 
  35. public function active_callback() { 
  36. return $this->manager->widgets->is_sidebar_rendered( $this->sidebar_id );