[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/customize/ -> class-wp-customize-nav-menu-name-control.php (source)

   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       * @var string
  24       */
  25      public $type = 'nav_menu_name';
  26  
  27      /**
  28       * No-op since we're using JS template.
  29       *
  30       * @since 4.3.0
  31       */
  32  	protected function render_content() {}
  33  
  34      /**
  35       * Render the Underscore template for this control.
  36       *
  37       * @since 4.3.0
  38       */
  39  	protected function content_template() {
  40          ?>
  41          <label>
  42              <# if ( data.label ) { #>
  43                  <span class="customize-control-title">{{ data.label }}</span>
  44              <# } #>
  45              <input type="text" class="menu-name-field live-update-section-title"
  46                  <# if ( data.description ) { #>
  47                      aria-describedby="{{ data.section }}-description"
  48                  <# } #>
  49                  />
  50          </label>
  51          <# if ( data.description ) { #>
  52              <p id="{{ data.section }}-description">{{ data.description }}</p>
  53          <# } #>
  54          <?php
  55      }
  56  }


Generated : Fri Mar 29 08:20:02 2024 Cross-referenced by PHPXref