MemberPress: Send Email to User When Their User Role Is Changed

function mepr_email_user_role_change( $user_id, $new_role ) { $site_url = get_bloginfo( ‘wpurl’ ); $user_info = get_userdata( $user_id ); $to = $user_info->user_email; $subject = “Your role has changed: “.$site_url; // Email Subject $message = “Hello ” .$user_info->display_name . “, your role has changed…Continue reading

Allow Unfiltered HTML by Role in Multisite

/** * Enable unfiltered_html capability for role. * * @param array $caps The user’s capabilities. * @param string $cap Capability name. * @param int $user_id The user ID. * @return array $caps The user’s capabilities, with ‘unfiltered_html’ potentially added. */…Continue reading