projects
/
WP-Themes
/
DiscoverKZOO.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f16fc0f
)
Remove the admin toolbar for none admin users
author
Steve Sutton
<steve@gaslightmedia.com>
Tue, 19 Apr 2016 16:44:21 +0000
(12:44 -0400)
committer
Steve Sutton
<steve@gaslightmedia.com>
Tue, 19 Apr 2016 16:44:21 +0000
(12:44 -0400)
functions.php
patch
|
blob
|
history
diff --git
a/functions.php
b/functions.php
index
748adf3
..
0107410
100644
(file)
--- a/
functions.php
+++ b/
functions.php
@@
-193,4
+193,11
@@
function landing_page_blocks( $atts )
return $out;
}
add_shortcode('glm-blocks', 'landing_page_blocks');
+add_action('after_setup_theme', 'remove_admin_bar');
+
+function remove_admin_bar() {
+ if (!current_user_can('administrator') && !is_admin()) {
+ show_admin_bar(false);
+ }
+}
?>