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 | |
add_filter( 'icwp-wpsf-user_subject_to_login_intent', function ( $bUserSubjectTo2FA, $oWpUser ) { | |
/** | |
* Insert Your logic here. | |
* Parameter $oWpUser is a WP_User object. | |
* Always return a boolean true/false from this function. | |
* In this example, if User ID is 1, always apply 2FA rules | |
*/ |
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 | |
/** | |
* Trigger Custom Shield Offense. | |
* | |
* Use a WP do_action() call to register a custom offense against an IP address. | |
* Supported in Shield Security 7.5+ | |
* | |
* Parameters: | |
* 1) The action name that we use to register your custom offense. This never changes. |
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 | |
add_filter( 'odp-shield-2fa_email_user_roles', function ( $aRoles ) { | |
$aRoles[] = 'your_custom_role'; | |
return $aRoles; | |
} ); |
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 | |
add_action( 'admin_init', function () { | |
remove_action( 'admin_notices', 'update_nag', 3 ); | |
} ); |
NewerOlder