[wp-trac] [WordPress Trac] #19371: As of 3.3beta2 WP_Admin_Bar no longer provides a way to access attributes of existing menu items

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 30 19:03:10 UTC 2011


#19371: As of 3.3beta2 WP_Admin_Bar no longer provides a way to access attributes
of existing menu items
------------------------------------+-----------------------
 Reporter:  willshouse              |       Owner:  nacin
     Type:  defect (bug)            |      Status:  accepted
 Priority:  high                    |   Milestone:  3.3
Component:  Admin Bar               |     Version:  3.3
 Severity:  minor                   |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+-----------------------
Changes (by nacin):

 * priority:  normal => high


Comment:

 [attachment:19371.4.diff]:

  * Anything that deals with the nodes property is private or final.
 _set_node(), _unset_node(), get_node(), and get_nodes(). This way, at
 least our internal storage is protected from plugins.

  * add_group() is a new wrapper, so it gets a final.

  * _bind() is finalized too. If you want to mess with this, override
 render() and do the whole thing yourself.

  * _render(), _render_item(), _render_group() are all protected but
 overridable.

  * recursive_render() is deprecated. It is back compat and simply wraps
 _render_item().

 One more pass is necessary:

  * Ideally, koopersmith can move some of the group binding stuff from
 _render_group() to _bind().

  * I don't think there's enough to ensure that $this->menu is back compat.
 Goal should be that it works in a read-only way.

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


More information about the wp-trac mailing list