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:
Drew Jaynes (DrewAPicture) 2014-04-25 06:49:48 +00:00
parent d1137de3de
commit 379f725bde
2 changed files with 4 additions and 11 deletions

View File

@ -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 ) )

View File

@ -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 );