Skip to content

Instantly share code, notes, and snippets.

@diije
Created June 12, 2013 13:18
Show Gist options
  • Save diije/5765162 to your computer and use it in GitHub Desktop.
Save diije/5765162 to your computer and use it in GitHub Desktop.
WordPress : empêcher la connexion à l'interface d'administration pour les abonnés. Détails et explications : http://www.diije.fr/wordpress-hack-empecher-connexion-abonnes/
<?php
function dfr_control_login() {
//ne s'applique pas aux contributeurs, auteurs, éditeurs, admins
if (!current_user_can('edit_posts') ){
wp_logout();
}
}
add_action('wp_login','dfr_control_login');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment