X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0459461f9ea42e0b090759ff6fe5f48360bef750..refs/tags/wordpress-4.5:/wp-includes/class-wp-admin-bar.php diff --git a/wp-includes/class-wp-admin-bar.php b/wp-includes/class-wp-admin-bar.php index f4021008..b89c6542 100644 --- a/wp-includes/class-wp-admin-bar.php +++ b/wp-includes/class-wp-admin-bar.php @@ -96,7 +96,11 @@ class WP_Admin_Bar { } /** - * Add a node to the menu. + * Adds a node to the menu. + * + * @since 3.1.0 + * @since 4.5.0 Added the ability to pass 'lang' and 'dir' meta data. + * @access public * * @param array $args { * Arguments for adding a node. @@ -106,7 +110,7 @@ class WP_Admin_Bar { * @type string $parent Optional. ID of the parent node. * @type string $href Optional. Link for the item. * @type bool $group Optional. Whether or not the node is a group. Default false. - * @type array $meta Meta data including the following keys: 'html', 'class', 'rel', + * @type array $meta Meta data including the following keys: 'html', 'class', 'rel', 'lang', 'dir', * 'onclick', 'target', 'title', 'tabindex'. Default empty. * } */ @@ -506,12 +510,24 @@ class WP_Admin_Bar { if ( ! empty( $node->meta['rel'] ) ) : ?> rel="meta['rel'] ); ?>"meta['lang'] ) ) : + ?> lang="meta['lang'] ); ?>"meta['dir'] ) ) : + ?> dir="meta['dir'] ); ?>">
meta['title'] ) ) : ?> title="meta['title'] ); ?>"meta['lang'] ) ) : + ?> lang="meta['lang'] ); ?>"meta['dir'] ) ) : + ?> dir="meta['dir'] ); ?>">