Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#12951 closed defect (bug) (fixed)

Admin Menu Items overwritten with custom post types

Reported by: blepoxp Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Administration Keywords: has-patch
Focuses: Cc:


When the arg for menu_position in register_post_type == an existing menu position before that point in the code, it overwrites it. In the case where it is the same as core menu positions further along in the code, it gets overwritten.

I discussed solutions in dev chat with jane and dion. The solution in my patch is 5 lines and resolves both instances of the problem mentioned above.

Attachments (1)

menu_overwrite_fix.diff (1.1 KB) - added by blepoxp 6 years ago.
fixes admin menu items from being overwritten

Download all attachments as: .zip

Change History (3)

6 years ago

fixes admin menu items from being overwritten

#1 @blepoxp
6 years ago

  • Keywords has-patch added

#2 @dd32
6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [14049]) Prevent $post_type_object->menu_position from conflicting with another plugin, or core menu item. Props blepoxp. Fixes #12951

Note: See TracTickets for help on using tickets.