]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-includes/customize/class-wp-customize-nav-menu-auto-add-control.php
WordPress 4.4.1-scripts
[autoinstalls/wordpress.git] / wp-includes / customize / class-wp-customize-nav-menu-auto-add-control.php
1 <?php
2 /**
3  * Customize API: WP_Customize_Nav_Menu_Auto_Add_Control class
4  *
5  * @package WordPress
6  * @subpackage Customize
7  * @since 4.4.0
8  */
9
10 /**
11  * Customize control to represent the auto_add field for a given menu.
12  *
13  * @since 4.3.0
14  *
15  * @see WP_Customize_Control
16  */
17 class WP_Customize_Nav_Menu_Auto_Add_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_auto_add';
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                 <span class="customize-control-title"><?php _e( 'Menu options' ); ?></span>
45                 <label>
46                         <input type="checkbox" class="auto_add" />
47                         <?php _e( 'Automatically add new top-level pages to this menu' ); ?>
48                 </label>
49                 <?php
50         }
51 }