PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 4.1.3
Adminify – White Label, Admin Menu Editor, Login Customizer v4.1.3
4.3.1 4.3.0 4.2.26 4.2.25 4.2.24 4.2.23 4.2.22 4.2.21 4.2.20 4.2.19 4.2.18 4.2.17 4.2.16 4.2.15 4.2.14 4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 4.1.17 All 164 releases
adminify / Inc / Classes / Adminify_Admin_Bar.php

Adminify_Admin_Bar.php in Adminify – White Label, Admin Menu Editor, Login Customizer 4.1.3, at Inc/Classes/Adminify_Admin_Bar.php

52 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPAdminify\Inc\Classes;
4
5 class Adminify_Admin_Bar extends \WP_Admin_Bar {
6
7 public function render() {
8 $root = $this->_bind();
9
10 if ( empty( $root ) ) {
11 return;
12 }
13
14 $class = 'nojq nojs';
15 if ( wp_is_mobile() ) {
16 $class .= ' mobile';
17 }
18
19 ?>
20 <div id="wpadminbar" class="<?php echo esc_attr( $class ); ?>">
21 <?php if ( ! is_admin() && ! did_action( 'wp_body_open' ) ) { ?>
22 <a class="screen-reader-shortcut" href="#wp-toolbar" tabindex="1"><?php esc_html_e( 'Skip to toolbar', 'adminify' ); ?></a>
23 <?php } ?>
24 <div class="quicklinks navbar" id="wp-toolbar" role="navigation" aria-label="<?php esc_attr_e( 'Toolbar', 'adminify' ); ?>">
25 <?php
26 foreach ( $root->children as $group ) {
27 if ( $group->id !== 'top-secondary' ) {
28 $this->_render_group( $group );
29 }
30 }
31
32 if ( is_admin() ) {
33 do_action( 'adminify/before/secondary_menu' );
34 }
35
36 foreach ( $root->children as $group ) {
37 if ( $group->id === 'top-secondary' ) {
38 $this->_render_group( $group );
39 }
40 }
41 ?>
42 </div>
43 <?php if ( is_user_logged_in() ) : ?>
44 <a class="screen-reader-shortcut" href="<?php echo esc_url( wp_logout_url() ); ?>"><?php esc_html_e( 'Log Out', 'adminify' ); ?></a>
45 <?php endif; ?>
46 </div>
47
48 <?php
49 }
50
51 }
52