Ensure the wp_edit_nav_menu_walker filter is only documented once.

See #26869.

Built from https://develop.svn.wordpress.org/trunk@28213


git-svn-id: http://core.svn.wordpress.org/trunk@28043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2014-04-25 06:50:15 +00:00
parent ef643d9136
commit 029dd247be
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 );