Last active
January 3, 2016 17:59
-
-
Save JulioPotier/8499149 to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
/* | |
Plugin Name: Forcer des valeurs absolues par sécurité | |
Author: Julio Potier | |
AuthorURI: http://boiteaweb.fr | |
*/ | |
// Forcer l'adresse email admin | |
add_filter( 'option_admin_email', '_option_admin_email' ); | |
function _option_admin_email( $value ) { | |
return '[email protected]'; // valeur à modifier | |
} | |
// Forcer l'impossibilité de s'inscrire | |
add_filter( 'pre_option_users_can_register', '_option_users_can_register' ); | |
function _option_users_can_register( $value ) { | |
return '0'; | |
} | |
// Forcer le rôle par défaut sur "Abonné" | |
add_filter( 'pre_option_default_role', 'baw_option_default_role' ); | |
function baw_option_default_role( $value ) { | |
return 'subscriber'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment