Created
November 1, 2013 20:24
-
-
Save boluda/7271408 to your computer and use it in GitHub Desktop.
Negar acceso al backoffice de los suscriptores
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Negar acceso al backoffice de los suscriptores | |
function jbl_redirect_admin(){ | |
if ( ! current_user_can( 'edit_posts' ) ){ | |
wp_redirect( site_url() ); | |
exit; | |
} | |
} | |
add_action( 'admin_init', 'jbl_redirect_admin' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment