class-wp-customize-new-menu-section.php 965 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * Customize API: WP_Customize_New_Menu_Section class
  4. *
  5. * @package WordPress
  6. * @subpackage Customize
  7. * @since 4.4.0
  8. */
  9. /**
  10. * Customize Menu Section Class
  11. *
  12. * Implements the new-menu-ui toggle button instead of a regular section.
  13. *
  14. * @since 4.3.0
  15. *
  16. * @see WP_Customize_Section
  17. */
  18. class WP_Customize_New_Menu_Section extends WP_Customize_Section {
  19. /**
  20. * Control type.
  21. *
  22. * @since 4.3.0
  23. * @access public
  24. * @var string
  25. */
  26. public $type = 'new_menu';
  27. /**
  28. * Render the section, and the controls that have been added to it.
  29. *
  30. * @since 4.3.0
  31. * @access protected
  32. */
  33. protected function render() {
  34. ?>
  35. <li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="accordion-section-new-menu">
  36. <button type="button" class="button add-new-menu-item add-menu-toggle" aria-expanded="false">
  37. <?php echo esc_html( $this->title ); ?>
  38. </button>
  39. <ul class="new-menu-section-content"></ul>
  40. </li>
  41. <?php
  42. }
  43. }