Accept rel attributes in the toolbar's add_node() method.
props stephcook22. fixes #27234. git-svn-id: https://develop.svn.wordpress.org/trunk@27367 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e1028cfc7b
commit
1a91bee772
@ -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
Block a user