WP_Customize_Nav_Menus_Panel

Customize Nav Menus Panel Class.

Defined (1)

The class is defined in the following location(s).

/wp-includes/customize/class-wp-customize-nav-menus-panel.php  
  1. class WP_Customize_Nav_Menus_Panel extends WP_Customize_Panel { 
  2.  
  3. /** 
  4. * Control type. 
  5. * @since 4.3.0 
  6. * @access public 
  7. * @var string 
  8. */ 
  9. public $type = 'nav_menus'; 
  10.  
  11. /** 
  12. * Render screen options for Menus. 
  13. * @since 4.3.0 
  14. * @access public 
  15. */ 
  16. public function render_screen_options() { 
  17. // Adds the screen options. 
  18. require_once ABSPATH . 'wp-admin/includes/nav-menu.php'; 
  19. add_filter( 'manage_nav-menus_columns', 'wp_nav_menu_manage_columns' ); 
  20.  
  21. // Display screen options. 
  22. $screen = WP_Screen::get( 'nav-menus.php' ); 
  23. $screen->render_screen_options( array( 'wrap' => false ) ); 
  24.  
  25. /** 
  26. * Returns the advanced options for the nav menus page. 
  27. * Link title attribute added as it's a relatively advanced concept for new users. 
  28. * @since 4.3.0 
  29. * @deprecated 4.5.0 Deprecated in favor of wp_nav_menu_manage_columns(). 
  30. */ 
  31. public function wp_nav_menu_manage_columns() { 
  32. _deprecated_function( __METHOD__, '4.5.0', 'wp_nav_menu_manage_columns' ); 
  33. require_once ABSPATH . 'wp-admin/includes/nav-menu.php'; 
  34. return wp_nav_menu_manage_columns(); 
  35.  
  36. /** 
  37. * An Underscore (JS) template for this panel's content (but not its container). 
  38. * Class variables for this panel class are available in the `data` JS object; 
  39. * export custom variables by overriding WP_Customize_Panel::json(). 
  40. * @since 4.3.0 
  41. * @access protected 
  42. * @see WP_Customize_Panel::print_template() 
  43. */ 
  44. protected function content_template() { 
  45. ?> 
  46. <li class="panel-meta customize-info accordion-section <# if ( ! data.description ) { #> cannot-expand<# } #>"> 
  47. <button type="button" class="customize-panel-back" tabindex="-1"> 
  48. <span class="screen-reader-text"><?php _e( 'Back' ); ?></span> 
  49. </button> 
  50. <div class="accordion-section-title"> 
  51. <span class="preview-notice"> 
  52. <?php 
  53. /** translators: %s: the site/panel title in the Customizer */ 
  54. printf( __( 'You are customizing %s' ), '<strong class="panel-title">{{ data.title }}</strong>' ); 
  55. ?> 
  56. </span> 
  57. <button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"> 
  58. <span class="screen-reader-text"><?php _e( 'Help' ); ?></span> 
  59. </button> 
  60. <button type="button" class="customize-screen-options-toggle" aria-expanded="false"> 
  61. <span class="screen-reader-text"><?php _e( 'Menu Options' ); ?></span> 
  62. </button> 
  63. </div> 
  64. <# if ( data.description ) { #> 
  65. <div class="description customize-panel-description">{{{ data.description }}}</div> 
  66. <# } #> 
  67. <div id="screen-options-wrap"> 
  68. <?php $this->render_screen_options(); ?> 
  69. </div> 
  70. </li> 
  71. <?php