Accept rel attributes in the toolbar's add_node() method.
props stephcook22. fixes #27234. Built from https://develop.svn.wordpress.org/trunk@27367 git-svn-id: http://core.svn.wordpress.org/trunk@27217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bc7ea33113
commit
83a0b00489
|
@ -87,7 +87,7 @@ class WP_Admin_Bar {
|
|||
* - parent - string - The ID of the parent node. Optional.
|
||||
* - href - string - The link for the item. Optional.
|
||||
* - group - boolean - If the node is a group. Optional. Default false.
|
||||
* - meta - array - Meta data including the following keys: html, class, onclick, target, title, tabindex.
|
||||
* - meta - array - Meta data including the following keys: html, class, onclick, target, title, tabindex, rel.
|
||||
*/
|
||||
public function add_node( $args ) {
|
||||
// Shim for old method signature: add_node( $parent_id, $menu_obj, $args )
|
||||
|
@ -438,6 +438,9 @@ class WP_Admin_Bar {
|
|||
if ( ! empty( $node->meta['title'] ) ) :
|
||||
?> title="<?php echo esc_attr( $node->meta['title'] ); ?>"<?php
|
||||
endif;
|
||||
if ( ! empty( $node->meta['rel'] ) ) :
|
||||
?> rel="<?php echo esc_attr( $node->meta['rel'] ); ?>"<?php
|
||||
endif;
|
||||
?>><?php
|
||||
else:
|
||||
?><div class="ab-item ab-empty-item" <?php echo $aria_attributes;
|
||||
|
|
Loading…
Reference in New Issue