class-wp-customize-nav-menu-name-control.php 993 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. * Customize control to represent the name field for a given menu.
  11. *
  12. * @since 4.3.0
  13. *
  14. * @see WP_Customize_Control
  15. */
  16. class WP_Customize_Nav_Menu_Name_Control extends WP_Customize_Control {
  17. /**
  18. * Type of control, used by JS.
  19. *
  20. * @since 4.3.0
  21. * @access public
  22. * @var string
  23. */
  24. public $type = 'nav_menu_name';
  25. /**
  26. * No-op since we're using JS template.
  27. *
  28. * @since 4.3.0
  29. * @access protected
  30. */
  31. protected function render_content() {}
  32. /**
  33. * Render the Underscore template for this control.
  34. *
  35. * @since 4.3.0
  36. * @access protected
  37. */
  38. protected function content_template() {
  39. ?>
  40. <label>
  41. <# if ( data.label ) { #>
  42. <span class="customize-control-title screen-reader-text">{{ data.label }}</span>
  43. <# } #>
  44. <input type="text" class="menu-name-field live-update-section-title" />
  45. </label>
  46. <?php
  47. }
  48. }