Security Optimizer 1.7.0 has 4 actions and 10 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Security Optimizer fires an action
add_action( 'sg_security_2fa_login_failed', function() {
// Your code runs here.
}, 10, 1 );
// Change a value Security Optimizer is about to use
add_filter( 'login_title', function( $login_title, $title ) {
// Change $login_title here.
return $login_title;
}, 10, 2 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
login_title
filter/** * Filters the title tag content for login page. */ apply_filters( 'login_title', $login_title, $title ); -
apply_filters( 'sg_security_2fa_do_not_challenge', true ); -
sg_security_2fa_login_failed
actiondo_action( 'sg_security_2fa_login_failed' ); -
do_action( 'sg_security_2fa_login_success' ); -
sg_security_before_2fa_login
actiondo_action( 'sg_security_before_2fa_login' ); -
sg_security_2fa_block_xmlrpc
filterapply_filters( 'sg_security_2fa_block_xmlrpc', true, $user ); -
sg_security_2fa_roles
filterapply_filters( 'sg_security_2fa_roles', $roles ); -
sg_security_custom_crawlers
filterapply_filters( 'sg_security_custom_crawlers', array_merge( $this->crawlers, get_option( 'sg_security_user_crawlers', array() ) ) ); -
apply_filters( 'sg_security_custom_ping_services', array_merge( $this->ping_services, get_option( 'sg_security_user_ping_services', array() ) ) ); -
apply_filters( 'sg_security_illegal_usernames', $usernames ); -
sg_security_log_options
filterapply_filters( 'sg_security_log_options', $log_options ); -
apply_filters( 'sgs_set_activity_log_lifetime', get_option( 'sgs_activity_log_lifetime', 12 ) ); -
apply_filters( "sgs_whitelist_wp_{$this->type}", $this->types[ $this->type ]['whitelist'] );
Generated from Security Optimizer's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: