WordPress 4.4
[autoinstalls/wordpress.git] / wp-includes / customize / class-wp-customize-nav-menu-name-control.php
1 <?php
2 /**
3  * Customize API: WP_Customize_Nav_Menu_Name_Control class
4  *
5  * @package WordPress
6  * @subpackage Customize
7  * @since 4.4.0
8  */
9
10 /**
11  * Customize control to represent the name field for a given menu.
12  *
13  * @since 4.3.0
14  *
15  * @see WP_Customize_Control
16  */
17 class WP_Customize_Nav_Menu_Name_Control extends WP_Customize_Control {
18
19         /**
20          * Type of control, used by JS.
21          *
22          * @since 4.3.0
23          * @access public
24          * @var string
25          */
26         public $type = 'nav_menu_name';
27
28         /**
29          * No-op since we're using JS template.
30          *
31          * @since 4.3.0
32          * @access protected
33          */
34         protected function render_content() {}
35
36         /**
37          * Render the Underscore template for this control.
38          *
39          * @since 4.3.0
40          * @access protected
41          */
42         protected function content_template() {
43                 ?>
44                 <label>
45                         <# if ( data.label ) { #>
46                                 <span class="customize-control-title screen-reader-text">{{ data.label }}</span>
47                         <# } #>
48                         <input type="text" class="menu-name-field live-update-section-title" />
49                 </label>
50                 <?php
51         }
52 }