wp_widgets_add_menu

Append the Widgets menu to the themes main menu.

Description

wp_widgets_add_menu(); 

Usage

  1. if ( !function_exists( 'wp_widgets_add_menu' ) ) { 
  2. require_once ABSPATH . WPINC . '/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wp_widgets_add_menu(); 
  7.  

Defined (1)

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

/wp-includes/functions.php  
  1. function wp_widgets_add_menu() { 
  2. global $submenu; 
  3.  
  4. if ( ! current_theme_supports( 'widgets' ) ) 
  5. return; 
  6.  
  7. $submenu['themes.php'][7] = array( __( 'Widgets' ), 'edit_theme_options', 'widgets.php' ); 
  8. ksort( $submenu['themes.php'], SORT_NUMERIC );