25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 

62 satır
1.1 KiB

  1. <?php
  2. /**
  3. * Customize API: WP_Customize_Sidebar_Section class
  4. *
  5. * @package WordPress
  6. * @subpackage Customize
  7. * @since 4.4.0
  8. */
  9. /**
  10. * Customizer section representing widget area (sidebar).
  11. *
  12. * @since 4.1.0
  13. *
  14. * @see WP_Customize_Section
  15. */
  16. class WP_Customize_Sidebar_Section extends WP_Customize_Section {
  17. /**
  18. * Type of this section.
  19. *
  20. * @since 4.1.0
  21. * @access public
  22. * @var string
  23. */
  24. public $type = 'sidebar';
  25. /**
  26. * Unique identifier.
  27. *
  28. * @since 4.1.0
  29. * @access public
  30. * @var string
  31. */
  32. public $sidebar_id;
  33. /**
  34. * Gather the parameters passed to client JavaScript via JSON.
  35. *
  36. * @since 4.1.0
  37. *
  38. * @return array The array to be exported to the client as JSON.
  39. */
  40. public function json() {
  41. $json = parent::json();
  42. $json['sidebarId'] = $this->sidebar_id;
  43. return $json;
  44. }
  45. /**
  46. * Whether the current sidebar is rendered on the page.
  47. *
  48. * @since 4.1.0
  49. * @access public
  50. *
  51. * @return bool Whether sidebar is rendered.
  52. */
  53. public function active_callback() {
  54. return $this->manager->widgets->is_sidebar_rendered( $this->sidebar_id );
  55. }
  56. }