-
Notifications
You must be signed in to change notification settings - Fork 809
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
Disable Site Management? #1452
Comments
Yes, you can hide the Site Management banner and force deactivate the JSON API module on all sites of your network with this code: // First, hide the Remote Site Management banner
add_filter( 'can_display_jetpack_manage_notice', '__return_false' );
/*
* Then, force deactivate the JSON API module if it was activated in the past
* Note that this can break things you're using,
* like remote editors such as StackEdit or Display Posts widgets displaying content from that site
*/
function jeherve_force_deactivate_jsonapi() {
if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'json-api' ) ) {
Jetpack::deactivate_module( 'json-api' );
}
}
add_action( 'init', 'jeherve_force_deactivate_jsonapi' );
// And now, hide the JSON API module from the listing
function jeherve_kill_jsonapi( $modules ) {
unset( $modules['json-api'] );
return $modules;
}
add_filter( 'jetpack_get_available_modules', 'jeherve_kill_jsonapi' ); |
Thanks for the reply Jeherve. Where would I add this code? Thanks, |
You can paste this code in a functionality plugin. IT's worth noting that Site Management is disabled by default. This code just stops site admins in your Multisite network from enabling it. |
Thanks for the help. It worked! Thanks again, and happy holidays! |
Is there a way to disable site management for WordPress multisite?
Thanks,
Marc
The text was updated successfully, but these errors were encountered: