WP_Admin_Bar::_render( object $root )
Description Description
Parameters Parameters
- $root
-
(object) (Required)
Source Source
File: wp-includes/class-wp-admin-bar.php
final protected function _render( $root ) { global $is_IE; // Add browser classes. // We have to do this here since admin bar shows on the front end. $class = 'nojq nojs'; if ( $is_IE ) { if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 7' ) ) { $class .= ' ie7'; } elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 8' ) ) { $class .= ' ie8'; } elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 9' ) ) { $class .= ' ie9'; } } elseif ( wp_is_mobile() ) { $class .= ' mobile'; } ?> <div id="wpadminbar" class="<?php echo $class; ?>"> <?php if ( ! is_admin() ) { ?> <a class="screen-reader-shortcut" href="#wp-toolbar" tabindex="1"><?php _e( 'Skip to toolbar' ); ?></a> <?php } ?> <div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="<?php esc_attr_e( 'Toolbar' ); ?>"> <?php foreach ( $root->children as $group ) { $this->_render_group( $group ); } ?> </div> <?php if ( is_user_logged_in() ) : ?> <a class="screen-reader-shortcut" href="<?php echo esc_url( wp_logout_url() ); ?>"><?php _e( 'Log Out' ); ?></a> <?php endif; ?> </div> <?php }
Expand full source code Collapse full source code View on Trac