Skip to content

Commit

Permalink
Only add the node to the toolbar if the user has permissions to acces…
Browse files Browse the repository at this point in the history
…s the page

Fixes #21
  • Loading branch information
danielbachhuber committed Aug 26, 2012
1 parent 1d37aee commit 7c7799d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions developer.php
Expand Up @@ -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' ),
Expand Down

0 comments on commit 7c7799d

Please sign in to comment.