PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 3.0.4
Adminify – White Label, Admin Menu Editor, Login Customizer v3.0.4
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 3.0.4, at Inc/Classes/Adminify_Admin_Bar.php

50 lines 1.6 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
9 $root = $this->_bind();
10
11 if ( empty($root) ) return;
12
13 $class = 'nojq nojs';
14 if ( wp_is_mobile() ) {
15 $class .= ' mobile';
16 }
17
18 ?>
19 <div id="wpadminbar" class="<?php echo $class; ?>">
20 <?php if ( ! is_admin() && ! did_action( 'wp_body_open' ) ) { ?>
21 <a class="screen-reader-shortcut" href="#wp-toolbar" tabindex="1"><?php _e( 'Skip to toolbar' ); ?></a>
22 <?php } ?>
23 <div class="quicklinks navbar" id="wp-toolbar" role="navigation" aria-label="<?php esc_attr_e( 'Toolbar' ); ?>">
24 <?php
25 foreach ( $root->children as $group ) {
26 if ( $group->id !== 'top-secondary' ) {
27 $this->_render_group( $group );
28 }
29 }
30
31 ?>
32 <?php if(is_admin()) do_action( 'adminify/before/secondary_menu' ); ?>
33 <?php
34
35 foreach ( $root->children as $group ) {
36 if ( $group->id === 'top-secondary' ) {
37 $this->_render_group( $group );
38 }
39 }
40 ?>
41 </div>
42 <?php if ( is_user_logged_in() ) : ?>
43 <a class="screen-reader-shortcut" href="<?php echo esc_url( wp_logout_url() ); ?>"><?php _e( 'Log Out' ); ?></a>
44 <?php endif; ?>
45 </div>
46
47 <?php
48 }
49
50 }