Index: /trunk/src/wp-admin/includes/nav-menu.php =================================================================== --- /trunk/src/wp-admin/includes/nav-menu.php (revision 25934) +++ /trunk/src/wp-admin/includes/nav-menu.php (revision 25935) @@ -504,4 +504,14 @@ foreach ( $post_types as $post_type ) { + /** + * Filter whether a menu items meta box will be added for the current post type. + * + * If a falsey value is returned instead of a post type object, + * the post type menu items meta box will not be added. + * + * @since 3.0.0 + * + * @param object $post_type The post type object to be used as a meta box. + */ $post_type = apply_filters( 'nav_menu_meta_box_object', $post_type ); if ( $post_type ) { @@ -526,4 +536,14 @@ foreach ( $taxonomies as $tax ) { + /** + * Filter whether a menu items meta box will be added for the current taxonomy. + * + * If a falsey value is returned instead of a taxonomy object, + * the taxonomy menu items meta box will not be added. + * + * @since 3.0.0 + * + * @param object $tax The taxonomy object to be used as a meta box. + */ $tax = apply_filters( 'nav_menu_meta_box_object', $tax ); if ( $tax ) { @@ -781,5 +801,20 @@ } - $posts = apply_filters( 'nav_menu_items_'.$post_type_name, $posts, $args, $post_type ); + /** + * Filter the posts displayed in the 'View All' tab of the current + * post type's menu items meta box. + * + * The dynamic portion of the hook name, $post_type_name, + * refers to the slug of the current post type. + * + * @since 3.2.0 + * + * @see WP_Query::query() + * + * @param array $posts The posts for the current post type. + * @param array $args An array of WP_Query arguments. + * @param object $post_type The current post type object for this menu item meta box. + */ + $posts = apply_filters( "nav_menu_items_{$post_type_name}", $posts, $args, $post_type ); $checkbox_items = walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $posts), 0, (object) $args ); @@ -1138,4 +1173,12 @@ return $result . '
'; + /** + * Filter the Walker class used to render a menu formatted for editing. + * + * @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. + */ $walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $menu_id ); @@ -1282,4 +1325,5 @@ wp_defer_term_counting( false ); + /** This action is documented in wp-includes/nav-menu.php */ do_action( 'wp_update_nav_menu', $nav_menu_selected_id );