Advertisement
Guest User

Untitled

a guest
Jul 28th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.21 KB | None | 0 0
  1. function not_admin() {
  2.     if (current_user_can( 'manage_options' ) || DOING_AJAX) {
  3.         // Do nothing. 
  4.     } else {
  5.         header("Location: http://www.example.com/");
  6.     }
  7. }
  8.  
  9. add_action( 'admin_init', 'not_admin' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement