Shield Security 22.3.4 has 16 actions and 108 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 Shield Security fires an action
add_action( 'login_header', function() {
// Your code runs here.
}, 10, 1 );
// Change a value Shield Security is about to use
add_filter( 'login_body_class', function( $classes, $action ) {
// Change $classes here.
return $classes;
}, 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_body_class
filter/** * Filters the login page body classes. */ apply_filters( 'login_body_class', $classes, $action ); -
login_errors
filter/** * Filters the error messages displayed above the login form. */ apply_filters( 'login_errors', $errors ); -
login_header
action/** * Fires in the login page header after the body tag is opened. */ do_action( 'login_header' ); -
login_headertext
filter/** * Filters the link text of the header logo above the login form. */ apply_filters( 'login_headertext', $login_header_text ); -
login_headerurl
filter/** * Filters link URL of the header logo above login form. */ apply_filters( 'login_headerurl', $login_header_url ); -
login_message
filter/** * Filters the message to display above the login form. */ apply_filters( 'login_message', $this->action_data[ 'message' ] ?? '' ); -
login_messages
filter/** * Filters instructional messages displayed above the login form. */ apply_filters( 'login_messages', $messages ); -
login_title
filter/** * Filters the title tag content for login page. */ apply_filters( 'login_title', $login_title, esc_html( $this->action_data[ 'title' ] ?? '' ) ); -
/** * throw new \Exception() with desired message */ do_action( 'shield/2fa/email/pre_send_email/nonce_verified', $user, $plainNonce ); -
/** * throw new \Exception() with desired message */ do_action( 'shield/2fa/email/pre_send_email/pre_nonce_verify', $user, $plainNonce ); -
shield/is_request_blocked
filter/** * We start with `true` here since we'd only be here if all other * sub-conditions had been met. */ apply_filters( 'shield/is_request_blocked', true ); -
/** * foreach ( $this->enumExtensions() as $enumExtension ) { $env->addExtension( * new $enumExtension() ); } */ do_action( 'shield/services/pre_render_twig', $env ); -
shield/user_status_column
filter/** * need to cast as string as crappy programmers can't use filters properly. */ apply_filters( 'shield/user_status_column', [ $content, sprintf( '<em title="%s">%s</em>: %s', $lastLoginAt > 0 ? $carbon->toIso8601String() : __( 'Not Recorded', 'wp-simple-firewall' ), __( 'Last Login', 'wp-simple-firewall' ), $lastLoginAt > 0 ? $carbon->diffForHumans() : __( 'Not Recorded', 'wp-simple-firewall' ) ), sprintf( '<em title="%s">%s</em>: %s', empty( $ip->ip ) ? __( 'Unknown', 'wp-simple-firewall' ) : $ip->ip, __( 'Last Kno... ); -
mainwp_getsites
filterapply_filters( 'mainwp_getsites', $mwp->child_file, $mwp->child_key ); -
shield/antibot_score_minimum
filterapply_filters( 'shield/antibot_score_minimum', self::con()->opts->optGet( 'antibot_minimum' ) ); -
apply_filters( 'shield/master_site_license_url', self::con()->comps->license->activationURL() ); -
apply_filters( 'shield/rest_api_verify_permission', parent::verifyPermission( $req ), $req ); -
icwp_shield_from_email
filterapply_filters( 'icwp_shield_from_email', $from ); -
icwp_shield_from_email_name
filterapply_filters( 'icwp_shield_from_email_name', '' ); -
apply_filters( 'icwp_shield_plugin_badge_attributes', $badgeAttrs, $isFloating ); -
apply_filters( 'icwp_shield_plugin_badge_text', $protectedBy ); -
apply_filters( 'icwp_shield_renamewplogin_redirect_url', $redirectUrl ); -
login_enqueue_scripts
actiondo_action( 'login_enqueue_scripts' ); -
login_head
actiondo_action( 'login_head' ); -
login_redirect
filterapply_filters( 'login_redirect', $redirect, $redirect, $this->user ); -
mainwp_activated_check
filterapply_filters( 'mainwp_activated_check', false ); -
apply_filters( 'mainwp_extension_enabled_check', $con->getRootFile() ); -
mainwp_pageheader_extensions
actiondo_action( 'mainwp_pageheader_extensions', self::con()->getRootFile() ); -
plugin_locale
filterapply_filters( 'plugin_locale', $targetLoc, self::con()->getTextDomain() ); -
apply_filters( 'shield/2fa_email_enforced_user_roles', self::con()->opts->optGet( 'two_factor_auth_user_roles' ) ); -
shield/2fa_email_otp
filterapply_filters( 'shield/2fa_email_otp', $otp ); -
apply_filters( 'shield/2fa_passkey_registration_label', '' ); -
shield/2fa_providers
filterapply_filters( 'shield/2fa_providers', $this->enumShieldProviders() ); -
apply_filters( 'shield/2fa_remember_me_params', $this->getDefaultHashParams() ); -
shield/2fa_skip
filterapply_filters( 'shield/2fa_skip', ( new MfaSkip() )->canMfaSkip( $user ) ); -
apply_filters( 'shield/activity_logs/db_write_levels', $levels ); -
do_action( 'shield/after_form_submit_options_save', $form ); -
apply_filters( 'shield/anonymous_rest_api_exclusions', $exclusions ); -
apply_filters( 'shield/anonymous_rest_api/disabled_message', sprintf( __( 'Anonymous access to the WordPress REST API has been restricted by %s.', 'wp-simple-firewall' ), $con->labels->Name ), $namespace ); -
shield/audit_event_meta
filterapply_filters( 'shield/audit_event_meta', $meta, $evt ); -
shield/auditing_flags
filterapply_filters( 'shield/auditing_flags', [ 'users_audit_snapshot_admins_only' => Services::WpUsers()->count() > 10000, ] ); -
apply_filters( 'shield/bot_signals_allowable_extensions_404s', $def ); -
apply_filters( 'shield/bot_signals_allowable_invalid_scripts', $def ); -
apply_filters( 'shield/bot_signals_allowable_paths_404s', $def ); -
shield/can_run_antibot
filterapply_filters( 'shield/can_run_antibot', $con->comps->opts_lookup->enabledSilentCaptcha() && $con->db_con->bot_signals->isReady() ); -
apply_filters( 'shield/can_run_site_health_security', self::con()->comps->opts_lookup->isPluginEnabled() ); -
shield/can_send_telemetry
filterapply_filters( 'shield/can_send_telemetry', self::con()->comps->opts_lookup->enabledTelemetry() ); -
shield/collate_rule_builders
filterapply_filters( 'shield/collate_rule_builders', [] ); -
apply_filters( 'shield/comment_spam_explanation', sprintf( '## '.__( 'Comment SPAM Protection: %1$s %2$s', 'wp-simple-firewall' )."##\n", sprintf( __( '%1$s marked this comment as "%2$s".', 'wp-simple-firewall' ), self::con()->labels->Name, $humanStatus ), sprintf( __( 'Reason: %s', 'wp-simple-firewall' ), $this->spamReason ) ), $this->spamStatus, $this->spamReason ); -
apply_filters( 'shield/conflict_assets_to_dequeue', $default, $depContainer ); -
apply_filters( 'shield/crowdsec/decisions_update_interval', \HOUR_IN_SECONDS*2 ); -
shield/crowdsec/enroll_name
filterapply_filters( 'shield/crowdsec/enroll_name', $defaultName ); -
shield/crowdsec/enroll_tags
filterapply_filters( 'shield/crowdsec/enroll_tags', $defaultTags ); -
apply_filters( 'shield/crowdsec/login_scenarios', $scenarios ); -
apply_filters( 'shield/crowdsec/signals_cron_interval', \MINUTE_IN_SECONDS*5 ); -
apply_filters( 'shield/custom_audit_trail_handlers', [] ); -
shield/custom_dequeues
filterapply_filters( 'shield/custom_dequeues', [] ); -
shield/custom_enqueue_assets
filterapply_filters( 'shield/custom_enqueue_assets', [], $this->adminHookSuffix ); -
shield/custom_localisations
filterapply_filters( 'shield/custom_localisations', [], $this->adminHookSuffix, $this->enqueuedHandles ); -
apply_filters( 'shield/custom_localisations/components', [ 'badge' => [ 'key' => 'badge', 'handles' => [ 'badge', ], 'data' => fn() => [ 'ajax' => [ 'plugin_badge_close' => ActionData::Build( Actions\PluginBadgeClose::class ), ], ], ], 'blockdown' => [ 'key' => 'blockdown', 'handles' => [ 'main', ], 'data' => fn() => [ 'ajax' => [ Actions\BlockdownFormSubmit::SLUG => ActionData::Build( Actions\BlockdownFormSubmit::class ), Actions\BlockdownDisableFor... ); -
apply_filters( 'shield/custom_request_log_handlers', [] ); -
shield/custom_template_dirs
filterapply_filters( 'shield/custom_template_dirs', \array_unique( [ path_join( get_stylesheet_directory(), $dir ), path_join( get_template_directory(), $dir ), ] ) ); -
shield/daily_cron_hour
filterapply_filters( 'shield/daily_cron_hour', $hour ); -
apply_filters( 'shield/dashboard_widget_title', sprintf( '%s: %s', $con->labels->Name, __( 'Actions Queue', 'wp-simple-firewall' ) ) ); -
shield/email_from
filterapply_filters( 'shield/email_from', apply_filters( 'icwp_shield_from_email', $from ) ); -
shield/email_from_name
filterapply_filters( 'shield/email_from_name', apply_filters( 'icwp_shield_from_email_name', '' ) ); -
shield/enable_beta
filterapply_filters( 'shield/enable_beta', self::con()->opts->optIs( 'enable_beta', 'Y' ) ); -
shield/event
actiondo_action( 'shield/event', $event, $this->verifyAuditParams( $event, $meta ), $this->getEventDef( $event ) ); -
apply_filters( 'shield/events/custom_definitions', [] ); -
shield/events/definitions
filterapply_filters( 'shield/events/definitions', $built ); -
apply_filters( 'shield/export_include_ip_rules', true ); -
shield/file_scan_size_max
filterapply_filters( 'shield/file_scan_size_max', ScanActionVO::DEFAULT_MAX_FILE_SIZE ); -
shield/firewall_die_message
filterapply_filters( 'shield/firewall_die_message', [ __( "Data scanned in this request matched at least 1 firewall rule and is considered potentially dangerous.", 'wp-simple-firewall' ) ] ); -
shield/firewall_pre_block
actiondo_action( 'shield/firewall_pre_block' ); -
shield/get_extensions
filterapply_filters( 'shield/get_extensions', [], $this ); -
shield/get_ip_geo_data
filterapply_filters( 'shield/get_ip_geo_data', $this->seedCloudflare ? ( new Providers\CloudFlare() )->setThisRequest( $this->req )->lookup() : [] ); -
apply_filters( 'shield/high_reputation_ip_minimum', self::con()->opts->optGet( 'antibot_high_reputation_minimum' ) ); -
apply_filters( 'shield/human_spam_check_items', self::con()->cfg->configuration->def( 'human_spam_check_items' ) ); -
apply_filters( 'shield/ip_reputation_telemetry_mode', IpTelemetryMode::CANONICAL_EVIDENCE ); -
apply_filters( 'shield/ip_rules/cache_persist_no_rules', false ); -
shield/is_ip_blocked_auto
filterapply_filters( 'shield/is_ip_blocked_auto', $value ); -
shield/is_log_traffic
filterapply_filters( 'shield/is_log_traffic', false ); -
shield/is_trusted_request
filterapply_filters( 'shield/is_trusted_request', \in_array( $this->ip_id, ( new TrustedServices() )->enum() ), $this ); -
apply_filters( 'shield/live_traffic_log_duration', \HOUR_IN_SECONDS/2 ); -
shield/login_intent_timeout
filterapply_filters( 'shield/login_intent_timeout', self::con()->cfg->configuration->def( 'login_intent_timeout' ) ); -
shield/message_login_failed
filterapply_filters( 'shield/message_login_failed', __( 'Repeated login attempts that fail will result in a complete ban of your IP Address.', 'wp-simple-firewall' ) ); -
apply_filters( 'shield/mfa_profile/enqueue_frontend_assets', false ); -
shield/modules_configuration
actiondo_action( 'shield/modules_configuration' ); -
shield/notbot_cookie_life
filterapply_filters( 'shield/notbot_cookie_life', self::LIFETIME ); -
shield/notbot_js_insert
filterapply_filters( 'shield/notbot_js_insert', true ); -
shield/plugin_activated
actiondo_action( 'shield/plugin_activated' ); -
apply_filters( 'shield/plugin_badge_attributes', apply_filters( 'icwp_shield_plugin_badge_attributes', $badgeAttrs, $isFloating ), $isFloating ); -
shield/pre_snapshot_update
actiondo_action( 'shield/pre_snapshot_update', $auditor, $current, Ops\Convert::RecordToSnap( $this->getSnapshot( $slug ) ) ); -
apply_filters( 'shield/renamewplogin_redirect_url', apply_filters( 'icwp_shield_renamewplogin_redirect_url', $redirectUrl ) ); -
apply_filters( 'shield/render_data_custom_profiles_mfa', [ 'content' => [ 'providers' => $providerRenders, ], 'flags' => [ 'has_providers' => !empty( $providerRenders ), 'logged_in' => $user instanceof \WP_User, ], 'strings' => [ 'title' => (string)( $this->action_data[ 'title' ] ?? 'MFA' ), 'subtitle' => (string)( $this->action_data[ 'subtitle' ] ?? '' ), 'not_logged_in' => __( 'Not currently logged-in.', 'wp-simple-firewall' ), 'no_providers' => __... ); -
shield/report_email
filterapply_filters( 'shield/report_email', $e ); -
shield/rules/enum_conditions
filterapply_filters( 'shield/rules/enum_conditions', self::CONDITIONS ); -
shield/rules/enum_responses
filterapply_filters( 'shield/rules/enum_responses', self::RESPONSES ); -
shield/rules/enum_types
filterapply_filters( 'shield/rules/enum_types', [ self::CONDITION_TYPE_BOTS, self::CONDITION_TYPE_REQUEST, self::CONDITION_TYPE_USER, self::CONDITION_TYPE_SESSION, self::CONDITION_TYPE_SHIELD, self::CONDITION_TYPE_WP, self::CONDITION_TYPE_PHP, self::CONDITION_TYPE_SYSTEM, self::CONDITION_TYPE_FS, ] ); -
apply_filters( 'shield/scan_auto_filter_results', true ); -
shield/scan_cron_start_hour
filterapply_filters( 'shield/scan_cron_start_hour', $defaultStart ); -
apply_filters( 'shield/scan_cron_start_minute', wp_rand( 0, 59 ) ); -
shield/scan_ptg_file_exts
filterapply_filters( 'shield/scan_ptg_file_exts', $default ); -
shield/scan_queue_completed
actiondo_action( 'shield/scan_queue_completed' ); -
apply_filters( 'shield/scans_check_plugin_active', true ); -
apply_filters( 'shield/scans_check_plugin_update', true ); -
apply_filters( 'shield/scans_check_theme_active', true ); -
apply_filters( 'shield/scans_check_theme_update', true ); -
shield/show_dashboard_widget
filterapply_filters( 'shield/show_dashboard_widget', $con->cfg->properties[ 'show_dashboard_widget' ] ?? true ); -
shield/show_security_badge
filterapply_filters( 'shield/show_security_badge', self::con()->comps->opts_lookup->enabledPluginBadge() && ( Services::Request()->cookie( $this->getCookieIdBadgeState() ) != 'closed' ) ); -
apply_filters( 'shield/silent_captcha_bot_threshold', apply_filters( 'shield/antibot_score_minimum', self::con()->opts->optGet( 'antibot_minimum' ) ) ); -
shield/trusted_services
filterapply_filters( 'shield/trusted_services', Services::ServiceProviders()->getProviders_Flat() ); -
apply_filters( 'shield/user_suspend_can_manually_suspend', self::con()->isPluginAdmin(), Services::WpUsers()->getCurrentWpUser() ); -
apply_filters( 'shield/user_suspend_reset_password_url', Services::WpGeneral()->getLostPasswordUrl(), $context ); -
apply_filters( 'shield/user/is_user_account_idle', $isIdle, $user, $idleFor, $rolesToSuspend ); -
apply_filters( 'shield/user/is_user_hard_suspended', $meta->record->hard_suspended_at > 0, $user ); -
apply_filters( 'shield/user/is_user_password_expired', $isExpired, $user, $passAge, $expireTTL ); -
shield/wpvuln_scan_display
filterapply_filters( 'shield/wpvuln_scan_display', 'securityadmin' ); -
wp_search_stopwords
filterapply_filters( 'wp_search_stopwords', \array_map( fn( $word ) => \strtolower( \trim( (string)$word ) ), \explode( ',', _x( 'about,an,are,as,at,be,by,com,for,from,how,in,is,it,of,on,or,that,the,this,to,was,what,when,where,who,will,with,www', 'Comma-separated list of search stopwords in your language' ) ) ) );
Generated from Shield Security'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: