Make WordPress Core

Changeset 35450


Ignore:
Timestamp:
10/30/2015 05:46:53 AM (9 years ago)
Author:
DrewAPicture
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/nav-menu.php

    r35444 r35450  
    203203            // Give pages a higher priority.
    204204            $priority = ( 'page' == $post_type->name ? 'core' : 'default' );
    205             add_meta_box( "add-{$id}", $post_type->labels->name, 'wp_nav_menu_item_post_type_meta_box', 'nav-menus', 'side', $priority, $post_type );
     205            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 );
    206206        }
    207207    }
Note: See TracChangeset for help on using the changeset viewer.