wp_edit_nav_menu_walker

This filter is documented in wp-admin/includes/nav-menu.php.

Description

apply_filters( 'wp_edit_nav_menu_walker', (string) $walker_nav_menu_edit, (unknown) $post_menu ); 

Parameters (2)

0. $walker_nav_menu_edit (string) => 'Walker_Nav_Menu_Edit'
The walker nav menu edit.
1. $post_menu (unknown)
The post menu.

Usage

To run the hook, copy the example below.
  1. $walker_nav_menu_edit = apply_filters( 'wp_edit_nav_menu_walker', $walker_nav_menu_edit, $post_menu ); 
  2.  
  3. if ( !empty( $walker_nav_menu_edit ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the wp_edit_nav_menu_walker callback 
  2. function filter_wp_edit_nav_menu_walker( $walker_nav_menu_edit, $post_menu ) { 
  3. // make filter magic happen here... 
  4. return $walker_nav_menu_edit
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'wp_edit_nav_menu_walker', 'filter_wp_edit_nav_menu_walker', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'wp_edit_nav_menu_walker', 'filter_wp_edit_nav_menu_walker', 10, 2 ); 

Defined (2)

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

/wp-admin/includes/ajax-actions.php  
  1. $walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $_POST['menu'] ); 
/wp-admin/includes/nav-menu.php  
  1. $walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $menu_id );