Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,13 @@
require_once BLACKBOX_DIR.'/application/BlackBox/WPConstants.php';
require_once BLACKBOX_DIR.'/application/BlackBox/WPGlobals.php';

if ( is_admin() )
BlackBox::init();
BlackBox::init();

// remove the blackbox display if not administrator role
add_action('plugins_loaded','blackbox_user_filter');
function blackbox_user_filter() {
global $current_user; $current_user = wp_get_current_user();
if (in_array('administrator', $current_user->roles)) {return;}
remove_action('admin_footer', array('BlackBox_Hook', 'footer'));
remove_action('wp_footer', array('BlackBox_Hook', 'footer'));
}