Skip to content

Commit

Permalink
Removed is_user_member_of_blog calls in favor of API permissions.
Browse files Browse the repository at this point in the history
  • Loading branch information
zinigor committed Dec 20, 2018
1 parent 8837184 commit 9c3bff1
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions sal/class.json-api-site-jetpack-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,11 @@ function after_render_options( &$options ) {
}

function get_jetpack_modules() {
if ( is_user_member_of_blog() ) {
return array_values( Jetpack_Options::get_option( 'active_modules', array() ) );
}

return null;
return array_values( Jetpack_Options::get_option( 'active_modules', array() ) );
}

function is_module_active( $module ) {
if ( is_user_member_of_blog() ) {
return in_array ( $module, Jetpack_Options::get_option( 'active_modules', array() ), true );
}

return false;
return in_array ( $module, Jetpack_Options::get_option( 'active_modules', array() ), true );
}

function is_vip() {
Expand Down

0 comments on commit 9c3bff1

Please sign in to comment.