Forked from kcpt-steven-kohlmeyer/redirect-subscriber.php
Created
April 24, 2016 07:51
-
-
Save samjco/b0106243aeb199cfb9b93b05f08b103a to your computer and use it in GitHub Desktop.
Revisions
-
kcpt-steven-kohlmeyer created this gist
Feb 9, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ <?php global $current_user; // Use global get_currentuserinfo(); // Make sure global is set, if not set it. if ( user_can( $current_user, "subscriber" ) ) { // Disable admin bar for subscribers show_admin_bar(false); // If trying to view back end of wordpress if( is_admin() ) { wp_redirect( home_url() ); } }