mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 00:01:27 +01:00
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:
parent
ef643d9136
commit
029dd247be
@ -956,14 +956,7 @@ function wp_ajax_add_menu_item() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** This filter is documented in wp-admin/includes/nav-menu.php */
|
||||||
* 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'].
|
|
||||||
*/
|
|
||||||
$walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $_POST['menu'] );
|
$walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $_POST['menu'] );
|
||||||
|
|
||||||
if ( ! class_exists( $walker_class_name ) )
|
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>';
|
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
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param string $walker_class_name The Walker class used to render a menu formatted for editing.
|
* @param string $class The walker class to use. Default 'Walker_Nav_Menu_Edit'.
|
||||||
* @param int $menu_id The ID of the menu being rendered.
|
* @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 );
|
$walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $menu_id );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user