class-wp-customize-new-menu-section.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. * @deprecated 4.9.0 This file is no longer used as of the menu creation UX introduced in #40104.
  9. */
  10. /**
  11. * Customize Menu Section Class
  12. *
  13. * @since 4.3.0
  14. * @deprecated 4.9.0 This class is no longer used as of the menu creation UX introduced in #40104.
  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. * @var string
  24. */
  25. public $type = 'new_menu';
  26. /**
  27. * Constructor.
  28. *
  29. * Any supplied $args override class property defaults.
  30. *
  31. * @since 4.9.0
  32. *
  33. * @param WP_Customize_Manager $manager Customizer bootstrap instance.
  34. * @param string $id An specific ID of the section.
  35. * @param array $args Section arguments.
  36. */
  37. public function __construct( WP_Customize_Manager $manager, $id, array $args = array() ) {
  38. _deprecated_file( basename( __FILE__ ), '4.9.0' ); // @todo Move this outside of class, and remove its require_once() from class-wp-customize-section.php. See #42364.
  39. parent::__construct( $manager, $id, $args );
  40. }
  41. /**
  42. * Render the section, and the controls that have been added to it.
  43. *
  44. * @since 4.3.0
  45. */
  46. protected function render() {
  47. ?>
  48. <li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="accordion-section-new-menu">
  49. <button type="button" class="button add-new-menu-item add-menu-toggle" aria-expanded="false">
  50. <?php echo esc_html( $this->title ); ?>
  51. </button>
  52. <ul class="new-menu-section-content"></ul>
  53. </li>
  54. <?php
  55. }
  56. }