[wp-trac] [WordPress Trac] #23095: Add Object Page has no Position Parameter

WordPress Trac noreply at wordpress.org
Thu Jan 3 02:34:08 UTC 2013


#23095: Add Object Page has no Position Parameter
----------------------------+----------------------
 Reporter:  chriscct7       |       Owner:
     Type:  enhancement     |      Status:  closed
 Priority:  normal          |   Milestone:
Component:  Administration  |     Version:  3.5
 Severity:  normal          |  Resolution:  wontfix
 Keywords:                  |
----------------------------+----------------------
Changes (by SergeyBiryukov):

 * keywords:  close =>
 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 Related: [9537], [9949], [11856].

 > Position parameter should be mandatory. This will prevent countless
 plugin conflicts while only requiring two extra characters for
 programmers.

 I guess it will actually cause a lot more conflicts. From the Codex
 article on `add_menu_page()`:

  WARNING: if two menu items use the same position attribute, one of the
 items may be overwritten so that only one item displays!

 Forcing plugin developers to come up with unique position parameters is
 not feasible. As noted above, `add_menu_page()` should be used instead,
 which uses the next available position if it's not specified: [[BR]]
 http://core.trac.wordpress.org/browser/tags/3.5/wp-
 admin/includes/plugin.php#L915

 FWIW, I could not reproduce the original bug with Easy Digital Downloads
 1.4.0.3 and Contact Form 7 3.3.2. All of the versions of Easy Digital
 Downloads I could find in the repository (from 1.0.1.1 to 1.4.0.3) use
 `register_post_type()` rather than `add_object_page()` to add the menu
 item.

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


More information about the wp-trac mailing list