Forked from ronalfy/allow-users-to-view-network.php
Created
September 9, 2020 12:58
-
-
Save dexit/b5bc101a4398660f2b8cba99e262610a 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