diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index f72aafa052..f76119b910 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -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 ) ) diff --git a/src/wp-admin/includes/nav-menu.php b/src/wp-admin/includes/nav-menu.php index 38ca22e0e2..1dfccf058d 100644 --- a/src/wp-admin/includes/nav-menu.php +++ b/src/wp-admin/includes/nav-menu.php @@ -1165,12 +1165,12 @@ function wp_get_nav_menu_to_edit( $menu_id = 0 ) { return $result . '
'; /** - * 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 );