The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
/*-----------------------------------------------------------------------------------*/ | |
/* Don't let non-admin users access wp-admin. | |
/*-----------------------------------------------------------------------------------*/ | |
add_action( 'init', 'blockusers_init' ); | |
function blockusers_init() { | |
if ( is_admin() && ! current_user_can( 'administrator' ) ) { | |
wp_redirect( home_url() ); | |
exit; | |
} | |
} |
I hereby claim:
To claim this, I am signing this object:
Verifying that +danegan is my blockchain ID. https://onename.com/danegan |