SiteFort Security 2.1.3 has 58 actions and 41 filters, read directly from its source code on Nov 19, 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 SiteFort Security fires an action
add_action( 'sitefort_firewall_lockout_changed', function( $arg1 ) {
// Your code runs here.
}, 10, 1 );
// Change a value SiteFort Security is about to use
add_filter( 'sitefort_csp_directives', function( $directives, $settings ) {
// Change $directives here.
return $directives;
}, 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.
Changes by version
2.1.2 → 2.1.3 · Nov 19, 2026 · 0 added, 0 removed
No hooks were added or removed in this release.
2.1.1 → 2.1.2 · Nov 19, 2026 · 0 added, 0 removed
No hooks were added or removed in this release.
All hooks
-
/** * Notify lockout consumers (e.g. Cloudflare sync) of lockout mutation. */ do_action( 'sitefort_firewall_lockout_changed', [ 'event' => 'added', 'ip' => $ip, 'type' => $type, 'source' => $meta[ $ip ]['source'], 'reason' => $meta[ $ip ]['reason'], 'expires_at' => $expires_at, ] ); -
/** * Fires after the admin user ID has been changed from 1. */ do_action( 'sitefort_admin_user_id_changed', $new_id, $user ); -
/** * Allow enabled SiteFort integrations to add their narrowly scoped CSP origins * without replacing the administrator's selected policy. */ apply_filters( 'sitefort_csp_directives', $directives, $settings ); -
/** * Fires after the database prefix has been changed. */ do_action( 'sitefort_database_prefix_changed', $new_prefix, $old_prefix ); -
/** * Filter the list of allowed wp-login.php actions when login URL is renamed. */ apply_filters( 'sitefort_login_rename_allowed_actions', $allowed_actions ); -
/** * Filter whether to publicly allow a third-party login_form action without a * SiteFort login handoff. */ apply_filters( 'sitefort_login_rename_auto_allow_action', false, $action ); -
/** * Filter the capability that marks a browser as a known wp-admin user. */ apply_filters( 'sitefort_login_rename_known_admin_cap', 'edit_posts' ); -
/** * Filter whether known-admin browsers bypass login rename blocking. */ apply_filters( 'sitefort_login_rename_known_admin_enabled', true ); -
/** * Filter how long a browser stays known after an admin login. */ apply_filters( 'sitefort_login_rename_known_admin_ttl', $default, $remembered ); -
/** * Filter core /wp/ REST controller classes that SiteFort should defer to after * WordPress has already passed permission_callback. */ apply_filters( 'sitefort_rest_api_controller_permission_allowlist', $classes ); -
/** * Fires after WordPress authentication salts have been regenerated. */ do_action( 'sitefort_salts_regenerated' ); -
/** * Fallback scan-duration ceiling when no explicit limit is set. */ apply_filters( 'sitefort_scanner_default_max_duration', self::DEFAULT_MAX_SCAN_DURATION ); -
/** * Loopback dispatch ack timeout in seconds, clamped to 2-15. */ apply_filters( 'sitefort_scanner_worker_ack_timeout', 5 ); -
/** * Filter whether trusted browsers skip account lockouts. */ apply_filters( 'sitefort_trusted_login_browser_enabled', true ); -
do_action( 'sitefort_tools_action_completed', 'regenerate_salts' ); -
do_action( 'sitefort_firewall_block', [ 'site_url' => home_url(), 'ip' => $ip, 'attack_type' => ExploitGuard::ATTACK_TYPE, 'request_uri' => $uri, 'recorded' => true, 'rule_ref' => (string) $row['rule_ref'], ] ); -
do_action( 'sitefort_lockout_cleared', $ip, 'ip' ); -
apply_filters( 'sitefort_detected_server', $detected ); -
do_action( 'wp_login_failed', $user->user_login, new \WP_Error( 'sitefort_captcha_email_failed', __( 'Login email verification failed.', 'sitefort' ) ) ); -
do_action( 'sitefort_cloudflare_action', is_wp_error( $result ) ? 'sync_failed' : 'sync', '' ); -
do_action( 'sitefort_lockout_activated', $ip, 'ip', $lockout_context + [ 'reason' => 'admin_username_attempt' ] ); -
do_action( 'sitefort_scan_results_changed', [ 'action' => $action, 'issue_hash' => $item_hash, 'active_count' => $active_count, ] ); -
apply_filters( 'https_local_ssl_verify', false ); -
do_action( 'sitefort_2fa_disabled', $user_id, [ 'username' => $user->user_login, 'previous_method' => EnrollmentStore::method_of( $row ), 'recovery_codes_cleared' => true, 'recovery_method' => 'password_email', ] ); -
apply_filters( 'sitefort_filter_can_write_to_files', $can_write ); -
do_action( 'sitefort_password_changed', $user_id ); -
do_action( 'sitefort_scan_started', [ 'site_url' => home_url(), 'scan_id' => $queue['job_id'] ?? $queue['id'], 'scan_type' => $scan_type, 'status' => $queue['status'] ?? 'pending', ] ); -
do_action( 'sitefort_server_rule_state_changed', [] ); -
do_action( 'sitefort_verified_file_cached', $file['file_path'], $file['id'] ); -
{$committed['is_stopped']?}sitefort_scan_stopped{:}sitefort_scan_failed
action Copy link Customise this hookdo_action( "{$committed['is_stopped']?}sitefort_scan_stopped{:}sitefort_scan_failed", $committed['event'] ); -
apply_filters( 'admin_email_check_interval', 6 * MONTH_IN_SECONDS ); -
apply_filters( 'editable_roles', $all ); -
do_action( 'litespeed_control_set_nocache', 'SiteFort protected login' ); -
do_action( 'litespeed_purge', \LiteSpeed\API::TYPE_LOGIN ); -
apply_filters( 'login_redirect', $redirect_to, $requested, $user ); -
apply_filters( 'rest_url', $url, '/', $owner, 'rest' ); -
apply_filters( 'session_token_manager', 'WP_User_Meta_Session_Tokens' ); -
apply_filters( 'sitefort_2fa_account_notice_enabled', true, $type, $user ); -
do_action( 'sitefort_2fa_challenge_locked', $user->ID, $details ); -
do_action( 'sitefort_2fa_enrolled', $user->ID, [ 'username' => $user->user_login, 'method' => $method, 'recovery_codes_remaining' => RecoveryCodes::get_remaining_count( $user->ID ), ] ); -
do_action( 'sitefort_2fa_fallback_activated', $user->ID, $details ); -
do_action( 'sitefort_2fa_grace_extended', $target->ID, [ 'username' => $target->user_login, 'days' => $days, 'actor' => $actor ? $actor->user_login : 'WP-CLI', ] ); -
do_action( 'sitefort_2fa_imported', $user->ID, [ 'username' => $user->user_login, 'source' => 'wordfence', 'actor' => $this->actor ? $this->actor->user_login : 'WP-CLI', 'recovery_codes_remaining' => RecoveryCodes::get_remaining_count( $user->ID ), ] ); -
do_action( 'sitefort_2fa_method_changed', $user_id, [ 'username' => $user->user_login, 'previous_method' => $previous, 'method' => $pending['method'], ] ); -
do_action( 'sitefort_2fa_recovery_codes_regenerated', $user_id, [ 'username' => $user instanceof \WP_User ? $user->user_login : '', 'recovery_codes_remaining' => count( $codes ), ] ); -
do_action( 'sitefort_2fa_remembered_device', $user->ID, $details ); -
do_action( 'sitefort_2fa_reminder_sent', $user->ID, [ 'username' => $user->user_login ] ); -
do_action( 'sitefort_2fa_reset_by_admin', $target->ID, [ 'username' => $target->user_login, 'previous_method' => EnrollmentStore::method_of( $row ), 'actor' => $actor ? $actor->user_login : 'WP-CLI', ] ); -
do_action( 'sitefort_2fa_verification_failed', $user->ID, $details ); -
do_action( 'sitefort_2fa_verified', $user->ID, $details ); -
do_action( 'sitefort_admin_recovery_ip_added', $ip ); -
do_action( 'sitefort_admin_username_changed', $user_id, $old_username, $new_username ); -
do_action( 'sitefort_audit_log_created' ); -
do_action( 'sitefort_audit_log_entry', $event, [ 'message' => self::build_message( $event, $details ), 'details' => $details, 'username' => $username, 'user_id' => $user_id, 'ip' => $ip, 'level' => $severity, 'category' => $category, ] ); -
apply_filters( 'sitefort_audit_log_retention_days', $db_days ); -
do_action( 'sitefort_auth_before_login_finalized', $user, $session ); -
apply_filters( 'sitefort_captcha_required', true, $action, $surface ); -
do_action( 'sitefort_captcha_runtime_status_changed' ); -
apply_filters( 'sitefort_filter_wp_config_file_path', $default_path ); -
apply_filters( 'sitefort_firewall_log_max_rows', self::DEFAULT_MAX_ROWS ); -
apply_filters( 'sitefort_firewall_log_retention_days', $days ); -
do_action( 'sitefort_fsm_metric', $type, $name, $success ); -
do_action( 'sitefort_fsm_transition', $file_id, $from_state, $to_state ); -
apply_filters( 'sitefort_hosting_platform', $platform ); -
apply_filters( 'sitefort_login_rename_access_cookie_ttl', HOUR_IN_SECONDS ); -
apply_filters( 'sitefort_login_rename_public_login_url', $candidate !== '' ? $candidate : $fallback ); -
do_action( 'sitefort_login_url_changed', home_url( '/' . $new['rename_login_url_slug'] ) ); -
do_action( 'sitefort_old_scans_cleaned', $cleaned, $days_old ); -
do_action( 'sitefort_plugin_deactivating' ); -
do_action( 'sitefort_plugin_reset' ); -
apply_filters( 'sitefort_pre_get_ip', null ); -
do_action( 'sitefort_push_notification_event', $event_type, $data ); -
apply_filters( 'sitefort_quarantine_max_file_bytes', self::MAX_FILE_BYTES ); -
apply_filters( 'sitefort_request_is_measurable', $measurable ); -
apply_filters( 'sitefort_rest_api_allowed_routes', $user_routes ); -
do_action( 'sitefort_scan_completed', $committed['event'] ); -
do_action( 'sitefort_scan_failure_alert', $type, $message, $context ); -
do_action( 'sitefort_scan_results_processed', $this->scan_id, $job_id, $issue_count ); -
apply_filters( 'sitefort_scanner_max_active_cloud_jobs', $limit, $this->scan_id ); -
apply_filters( 'sitefort_scanner_upload_policy', $policy, $this->scan_id, $metrics, $pressure, $payload ); -
apply_filters( 'sitefort_server_rule_state', $state ); -
apply_filters( 'sitefort_server_rules_apache', '' ); -
apply_filters( 'sitefort_server_rules_nginx', '' ); -
sitefort_settings_saved_{($column==='scanner'?'scanner_settings':$column)}
action Copy link Customise this hookdo_action( "sitefort_settings_saved_{($column==='scanner'?'scanner_settings':$column)}", $next ); -
do_action( "sitefort_settings_saved_{$column}", $data ); -
do_action( 'sitefort_settings_saved_cloudflare', $settings ); -
do_action( 'sitefort_settings_saved_notifications', $this->get_redacted() ); -
do_action( 'sitefort_settings_saved_scanner_settings', $settings ); -
apply_filters( 'sitefort_trust_internal_hop', $trusted, $ip ); -
do_action( 'sitefort_vulns_found_batch', $new_payloads ); -
apply_filters( 'sitefort_waf_bootstrap_externally_managed', $managed ); -
apply_filters( 'sitefort_waf_bootstrap_path', $default ); -
apply_filters( 'sitefort_waf_runtime_storage_backend', $backend ); -
do_action( 'sitefort_watchdog_complete', [ 'worker_restarts' => $restarted ] ); -
do_action( 'sitefort_watchdog_start' ); -
apply_filters( 'woocommerce_login_redirect', $redirect_to, $user ); -
do_action( 'wp_login', $user->user_login, $user );
Generated from SiteFort Security's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: