Advertisement
thesufi

Disallow admin access except user id 1

May 22nd, 2014
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.17 KB | None | 0 0
  1. //activating blackout
  2. function black_out() {
  3.     if ( get_current_user_id() != 1 ) {
  4.         wp_die ('Maintanance Going on...' );
  5.     }
  6. }
  7. add_action( 'admin_init', 'black_out' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement