Created
June 14, 2017 20:31
-
-
Save ronalfy/e981ccbcd7c6476481757e5686bdbfe2 to your computer and use it in GitHub Desktop.
WP Force Login - Multisite - Allow All Logged In Users to View Network
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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