Skip to content

Commit

Permalink
Admin - Menu: if user is not an admin and site is in Dev Mode, don't …
Browse files Browse the repository at this point in the history
…do anything. (#5396)
  • Loading branch information
eliorivero authored and bwilczek committed Nov 1, 2016
1 parent b45f4c4 commit 88f7d36
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions _inc/lib/admin-pages/class.jetpack-admin-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ function __construct() {
}

function add_actions() {
/**
* Don't add in the modules page unless modules are available!
*/

// If user is not an admin and site is in Dev Mode, don't do anything
if ( ! current_user_can( 'manage_options' ) && Jetpack::is_development_mode() ) {
return;
}

// Don't add in the modules page unless modules are available!
if ( $this->dont_show_if_not_active && ! Jetpack::is_active() && ! Jetpack::is_development_mode() ) {
return;
}
Expand Down

0 comments on commit 88f7d36

Please sign in to comment.