Skip to content
Browse files

Only add the node to the toolbar if the user has permissions to acces…

…s the page

Fixes #21
  • Loading branch information...
1 parent 1d37aee commit 7c7799dc6433bc867ec2392363c5a08e433032e3 @danielbachhuber danielbachhuber committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 developer.php
View
4 developer.php
@@ -205,6 +205,10 @@ public function register_settings_page() {
}
public function add_node_to_admin_bar( $wp_admin_bar ) {
+
+ if ( !current_user_can( 'manage_options' ) )
+ return;
+
$wp_admin_bar->add_node( array(
'id' => self::PAGE_SLUG,
'title' => esc_html__( 'Developer', 'a8c-developer' ),

0 comments on commit 7c7799d

Please sign in to comment.
Something went wrong with that request. Please try again.