Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'init', 'blockusers_init' );
- function blockusers_init() {
- if ( is_admin() && !current_user_can( 'author' ) && !( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
- wp_redirect( home_url() );exit;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement