This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from kimcoleman/dev
Tested up to version bump
- Loading branch information
Showing
2 changed files
with
6 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,27 +5,24 @@ | |
Description: A tweak of the code by Yoast to hide the admin bar for non-admins only. | ||
Version: 1.0 | ||
Author: Stranger Studios | ||
Author URI: http://www.strangerstudios.com | ||
Author URI: https://www.strangerstudios.com | ||
*/ | ||
/* | ||
Copyright 2013 Stranger Studios (email : [email protected]) | ||
Licensed under the GPLv2 license: http://www.gnu.org/licenses/gpl-2.0.html | ||
*/ | ||
|
||
function habfna_hide_admin_bar_settings() | ||
{ | ||
?> | ||
function habfna_hide_admin_bar_settings() { ?> | ||
<style type="text/css"> | ||
.show-admin-bar { | ||
display: none; | ||
} | ||
</style> | ||
<?php | ||
} | ||
function habfna_disable_admin_bar() | ||
{ | ||
if(!current_user_can('administrator')) | ||
{ | ||
|
||
function habfna_disable_admin_bar() { | ||
if ( ! current_user_can( 'administrator' ) ) { | ||
add_filter( 'show_admin_bar', '__return_false' ); | ||
add_action( 'admin_print_scripts-profile.php', 'habfna_hide_admin_bar_settings' ); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters