Ensure the wp_edit_nav_menu_walker
filter is only documented once.
See #26869. git-svn-id: https://develop.svn.wordpress.org/trunk@28213 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d1137de3de
commit
379f725bde
@ -956,14 +956,7 @@ function wp_ajax_add_menu_item() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the Walker class used when adding nav menu items.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param string $class The walker class to use. Default 'Walker_Nav_Menu_Edit'.
|
||||
* @param int $menu_id The menu id, derived from $_POST['menu'].
|
||||
*/
|
||||
/** This filter is documented in wp-admin/includes/nav-menu.php */
|
||||
$walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $_POST['menu'] );
|
||||
|
||||
if ( ! class_exists( $walker_class_name ) )
|
||||
|
@ -1165,12 +1165,12 @@ function wp_get_nav_menu_to_edit( $menu_id = 0 ) {
|
||||
return $result . ' <ul class="menu" id="menu-to-edit"> </ul>';
|
||||
|
||||
/**
|
||||
* Filter the Walker class used to render a menu formatted for editing.
|
||||
* Filter the Walker class used when adding nav menu items.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $walker_class_name The Walker class used to render a menu formatted for editing.
|
||||
* @param int $menu_id The ID of the menu being rendered.
|
||||
* @param string $class The walker class to use. Default 'Walker_Nav_Menu_Edit'.
|
||||
* @param int $menu_id ID of the menu being rendered.
|
||||
*/
|
||||
$walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $menu_id );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user