Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'parse_query', 'redirect_user' );
- function redirect_user($query) {
- $user_id = get_current_user_id();
- if (strlen($user_id) <> 1)
- global $pagenow,$post_type;
- if (is_admin() && $pagenow=='options-general.php' && $post_type =='page') {
- if ($post_type == "updraftplus") {
- wp_redirect( home_url() );
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement