From a18f309761e89e1beee80a1bc3f4693227330c9f Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Fri, 30 Oct 2015 05:46:53 +0000 Subject: [PATCH] Menus: Prevent display conflicts in the screen options for Menus when a post type and taxonomy share the same slug. Prior to this change, both taxonomies and post types added meta boxes to the Menus UI (which in-turn registered screen options) using the same ID formula: `add-{$id}`. This caused a conflict between the two elements, resulting in the rendering of a screen option for only the taxonomy or post type but not both. Moving to a new meta box ID for post types, `add-post-type-{$id}`, removes that conflict. Note: This change in meta box IDs for post types effectively resets current user settings for the visibility of post types in the Menus UI. Fixes #33925. git-svn-id: https://develop.svn.wordpress.org/trunk@35450 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/nav-menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/nav-menu.php b/src/wp-admin/includes/nav-menu.php index 017d6258d2..aa5fa75c24 100644 --- a/src/wp-admin/includes/nav-menu.php +++ b/src/wp-admin/includes/nav-menu.php @@ -202,7 +202,7 @@ function wp_nav_menu_post_type_meta_boxes() { $id = $post_type->name; // Give pages a higher priority. $priority = ( 'page' == $post_type->name ? 'core' : 'default' ); - add_meta_box( "add-{$id}", $post_type->labels->name, 'wp_nav_menu_item_post_type_meta_box', 'nav-menus', 'side', $priority, $post_type ); + add_meta_box( "add-post-type-{$id}", $post_type->labels->name, 'wp_nav_menu_item_post_type_meta_box', 'nav-menus', 'side', $priority, $post_type ); } } }