WordPress 4.7
[autoinstalls/wordpress.git] / wp-includes / customize / class-wp-customize-new-menu-section.php
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 /**
11  * Customize Menu Section Class
12  *
13  * Implements the new-menu-ui toggle button instead of a regular section.
14  *
15  * @since 4.3.0
16  *
17  * @see WP_Customize_Section
18  */
19 class WP_Customize_New_Menu_Section extends WP_Customize_Section {
20
21         /**
22          * Control type.
23          *
24          * @since 4.3.0
25          * @access public
26          * @var string
27          */
28         public $type = 'new_menu';
29
30         /**
31          * Render the section, and the controls that have been added to it.
32          *
33          * @since 4.3.0
34          * @access protected
35          */
36         protected function render() {
37                 ?>
38                 <li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="accordion-section-new-menu">
39                         <button type="button" class="button add-new-menu-item add-menu-toggle" aria-expanded="false">
40                                 <?php echo esc_html( $this->title ); ?>
41                         </button>
42                         <ul class="new-menu-section-content"></ul>
43                 </li>
44                 <?php
45         }
46 }