[wp-trac] [WordPress Trac] #16946: Bug between CPT menu_position and add_object_page()

WordPress Trac wp-trac at lists.automattic.com
Thu Mar 31 14:24:26 UTC 2011


#16946: Bug between CPT menu_position and add_object_page()
----------------------------+------------------------
 Reporter:  momo360modena   |       Owner:  scribu
     Type:  defect (bug)    |      Status:  reviewing
 Priority:  normal          |   Milestone:  3.2
Component:  Administration  |     Version:  3.1
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+------------------------

Comment (by blepoxp):

 I was apparently working on this at the same time mpvanwinkle77 was.
 Submitting my patch too - a little different approach:

 It could really use some extra testing though. I had to refactor it
 several times myself as I continued to find unintended consequences with
 my first attempts at patching. I'd love confirmation that the current
 patch doesn't cause problems elsewhere.

 It does two things: it prevents dynamically written $menu array keys from
 overwriting hardcoded keys provided by core. It also prevents keys
 previously added by custom post types and other add_menu_item calls from
 being overwritten. To accomplish this, I created a new function. Wasn't
 sure of the best name and place to define this function so let me know if
 you think it fits better elsewhere.

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


More information about the wp-trac mailing list