Skip to content

Instantly share code, notes, and snippets.

@ronalfy
Created June 14, 2017 20:31
Show Gist options
  • Save ronalfy/e981ccbcd7c6476481757e5686bdbfe2 to your computer and use it in GitHub Desktop.
Save ronalfy/e981ccbcd7c6476481757e5686bdbfe2 to your computer and use it in GitHub Desktop.
WP Force Login - Multisite - Allow All Logged In Users to View Network
<?php
/*
* Multisite for https://wordpress.org/plugins/wp-force-login/
* Allows all users of the network to view all sites and posts on the network
* Intended to be used as an mu-plugin
*/
add_action( 'template_redirect', function() {
if ( is_user_logged_in() ) {
remove_action('template_redirect', 'v_forcelogin');
}
},9,1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment