problematic snippets network activated on multisite
-
Hi Shea,
Thanks for the great plugin. We’ve been shifting code from functions.php into the code snippets with varying results. Many snippets have worked, but implementation of the below is proving delicate.
For example, the “Hide Password stuff” in the code below didn’t work at all. The Jetpack login is mandatory for our multisite.Would appreciate any tips or modifications you would recommend to get the below code to work properly when network activated on our multisite.
Thanks in advance!
// Activate Jetpack SSO Login module only
function ds_auto_activate_sso() {
return array( ‘sso’ );
}
add_filter( ‘jetpack_get_default_modules’, ‘ds_auto_activate_sso’ );// JetPack force wp.com login
add_filter( ‘jetpack_sso_bypass_login_forward_wpcom’, ‘__return_true’ );// JetPack avoid local login when bumped by privacy plugin
// Apparently this follows force wp.com login above so the two don’t conflict
add_filter( ‘jetpack_remove_login_form’, ‘__return_true’);// DID NOT WORK Hide password stuff in edit profile
From https://www.role-editor.com/hide-disable-wordpress-user-profile-fields/
if (is_admin()) {
add_filter(‘show_password_fields’, ‘show_password_fields’);function show_password_fields() {
if (current_user_can(‘administrator’)) {
return true;
}
return false;
}
}// DISABLE default WordPress new user notification emails
// From (with corrections!) https://www.itsupportnotifiguides.com/wordpress/wordpress-how-to-disable-new-user-notification-emails/
if (!function_exists(‘wp_new_user_notification’)) :
function wp_new_user_notification($user_id, $plaintext_pass = ”) {
return;
}endif;
- The topic ‘problematic snippets network activated on multisite’ is closed to new replies.