Skip to content
Commit d75d8dd9 authored by Andrew Nacin's avatar Andrew Nacin
Browse files

Finalize the WP_Admin_Bar architecture for 3.3.

 * Introduce a get_node() method for plugins.
 * Deprecate $wp_admin_bar->menu. Plugins will need to use get_node(), remove_node(), add_node() to make modifications. This finalizes a backwards incompatible change made earlier in the cycle.
 * Allow add_node() to take a node object (which could come from get_node(), then be modified).
 * Ensure that our underlying storage (the nodes property) is private to core. Introduce _set_node, _unset_node, _get_nodes, get_nodes as the only ways to interface with this.
 * Protect and finalize _render_item, and _render_group. render() remains public and technically overridable, though I would discourage this of plugin authors.
 * Deprecate recursive_render(). Use render() or _render_item().

More about the internals:
 * Late-binds a node's 'children' array.
 * Eliminates the root property, leverages a 'root' node.
 * Splits render() into _bind() and _render(), both protected and finalized.

Fixes #19371.


git-svn-id: https://core.svn.wordpress.org/trunk@19501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 5484bdc7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment