WP_Admin_Bar::_render( object $root )
- Since
- 3.3.0
- Source
wp-includes/class-wp-admin-bar.php:460
Parameters
$rootobject
Uses · 6
- wp_is_mobile()Test if the current browser runs on a mobile device (smart phone, tablet, etc.).
- is_admin()Determines whether the current request is for an administrative interface page.
- did_action()Retrieves the number of times an action has been fired during the current request.
- _e()Displays translated text.
- esc_attr_e()Displays translated text that has been escaped for safe use in an attribute.
- WP_Admin_Bar::_render_group()
Used by · 1
Source
final protected function _render( $root ) { /* * Add browser classes. * We have to do this here since admin bar shows on the front end. */ $class = 'nojq nojs'; if ( wp_is_mobile() ) { $class .= ' mobile'; } ?> <div id="wpadminbar" class="<?php echo $class; ?>"> <?php if ( ! is_admin() && ! did_action( 'wp_body_open' ) ) { ?> <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> </div> <?php }History
Introduced in 3.3.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, from
src/wp-includes/class-wp-admin-bar.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.