Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin - Dev Mode: if user is not an admin, don't add the Jetpack menu item #5396

Merged
merged 1 commit into from
Oct 26, 2016
Merged
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
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