Skip to content

Instantly share code, notes, and snippets.

Verifying that +danegan is my blockchain ID. https://onename.com/danegan
@deegs
deegs / keybase.md
Created April 25, 2014 13:15
Keybase Verification

Keybase proof

I hereby claim:

  • I am deegs on github.
  • I am danegan (https://keybase.io/danegan) on keybase.
  • I have a public key whose fingerprint is 704E CA12 E7D2 A319 4662 CFC0 B2A5 597E 5580 E6AD

To claim this, I am signing this object:

Contract Killer

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

@deegs
deegs / functions.php
Created October 23, 2012 16:22
Don't let non-admin users access wp-admin
/*-----------------------------------------------------------------------------------*/
/* 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;
}
}