[wp-trac] [WordPress Trac] #16856: When registering custom post type, menu_position isn't honored if it's a number passed as a string

WordPress Trac wp-trac at lists.automattic.com
Thu Oct 20 20:29:26 UTC 2011


#16856: When registering custom post type, menu_position isn't honored if it's a
number passed as a string
-------------------------------------+-----------------------------
 Reporter:  nathanrice               |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  Administration           |     Version:  3.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+-----------------------------

Comment (by WraithKenny):

 I've found a possibly related bug to this. Found a theme that registers 3
 public custom post types (only one of which has a numeric menu position)
 and a plugin uses add_object_page (without a numeric position). The
 plugin's menu overwrites one of the post types, but not the one with the
 numeric menu position. I had to solve this for a client today.

 Conceivably, this means that a plugin registering a CPT without a
 position, and another using add_object_menu can be caused to conflict by
 an unrelated 3rd plugin using a CPT with a numeric position. Strange huh?

 Disclaimer: I didn't dive into the core code, or deeply test this theory.
 I might after work.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16856#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list