Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function not_admin() {
- if (current_user_can( 'manage_options' ) || DOING_AJAX) {
- // Do nothing.
- } else {
- header("Location: http://www.example.com/");
- }
- }
- add_action( 'admin_init', 'not_admin' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement