Smarto Login Security 1.0.0 has 9 actions and 42 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 Smarto Login Security fires an action
add_action( 'wp_login', function( $user_login, $user ) {
// Your code runs here.
}, 10, 2 );
// Change a value Smarto Login Security is about to use
add_filter( 'wpsmarto_ls_2fa_methods', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );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
-
/** * This action is documented in wp-includes/user.php */ do_action( 'wp_login', $user->user_login, $user ); -
/** * Filters the second-factor methods, in order of preference. Backup codes * should stay last. */ apply_filters( 'wpsmarto_ls_2fa_methods', array( new Totp(), new Email_Code(), new Backup_Codes() ) ); -
/** * Fires when a user's two-factor methods are reset, so add-ons remove theirs. */ do_action( 'wpsmarto_ls_2fa_reset', (int) $user_id ); -
/** * Filters a route access decision. */ apply_filters( 'wpsmarto_ls_access_policy', true, $user, $context ); -
/** * Filters extra admin-post actions: name => callable. They get the same nonce * and capability checks as the built-in ones. */ apply_filters( 'wpsmarto_ls_admin_actions', array() ); -
/** * Filters the plugin screens (suffix => page class extending Pages\Page). */ apply_filters( 'wpsmarto_ls_admin_pages', $pages ); -
/** * Filters an error that stops an allow rule from being removed. */ apply_filters( 'wpsmarto_ls_allow_rule_removal_error', null, $rule ); -
/** * Allows a trusted integration to create sessions for guarded users without * the protected flow. Return true only for code you trust to have verified * every factor itself. */ apply_filters( 'wpsmarto_ls_allow_unverified_session', false, $user ); -
/** * Filters the forms CAPTCHA can protect (key => label). Login-screen forms an * add-on adds get the CAPTCHA script on wp-login.php. */ apply_filters( 'wpsmarto_ls_captcha_forms', $forms ); -
/** * Filters hostnames accepted in CAPTCHA responses. */ apply_filters( 'wpsmarto_ls_captcha_hostnames', array( $expected ) ); -
/** * Fires after the hourly cleanup. */ do_action( 'wpsmarto_ls_cleanup_done', $results ); -
/** * Filters the results of add-on cleanup tasks, which run first. */ apply_filters( 'wpsmarto_ls_cleanup_tasks', array() ); -
/** * Filters the label of a login context, '' when unknown. */ apply_filters( 'wpsmarto_ls_context_label', '', (string) $context ); -
/** * Filters wp-login.php actions allowed while the default login URL is hidden. */ apply_filters( 'wpsmarto_ls_default_login_allowed_actions', array( 'postpass', 'confirmaction', 'logout' ) ); -
/** * Filters extra checks: each from Diagnostics::check(). */ apply_filters( 'wpsmarto_ls_diagnostics_checks', array(), $loopback ); -
/** * Filters an email before it is sent. */ apply_filters( 'wpsmarto_ls_email', $message, $subject ); -
/** * Filters whether emails are sent as HTML (with a plain-text copy) or as plain * text only. */ apply_filters( 'wpsmarto_ls_email_html', true ); -
/** * Filters endpoint handlers. */ apply_filters( 'wpsmarto_ls_endpoints', array( 'challenge' => array( \WPSmarto\LoginSecurity\Auth\Auth_Flow::class, 'handle_page' ), ) ); -
/** * Fires after a security event is recorded. Used by notifications. */ do_action( 'wpsmarto_ls_event', $event, array_merge( $args, array( 'details' => $details ) ), $id ); -
/** * Filters whether an admin screen belongs to this plugin (its styles, scripts * and full-width layout). Add-ons use it for their own screens. */ apply_filters( 'wpsmarto_ls_is_plugin_screen', false !== strpos( (string) $hook, self::SLUG ), (string) $hook ); -
/** * Filters whether an account is a temporary one (an add-on creates them). */ apply_filters( 'wpsmarto_ls_is_temporary_account', false, $user ); -
/** * Fires after all Smarto Login Security modules are registered. */ do_action( 'wpsmarto_ls_loaded' ); -
/** * Fires for events the plugin itself does not notify about. */ do_action( 'wpsmarto_ls_notification_event', $event, $who, $extra, (int) $id ); -
/** * Filters the notification types (key => label). */ apply_filters( 'wpsmarto_ls_notification_types', $types ); -
/** * Filters the "online" threshold used by the online session filter. */ apply_filters( 'wpsmarto_ls_online_minutes', 5 ); -
/** * Filters the Overview protection list: each [label, on, page suffix, note]. */ apply_filters( 'wpsmarto_ls_overview_features', $features ); -
/** * Filters the Overview numbers: each [label, number, URL, optional key]. */ apply_filters( 'wpsmarto_ls_overview_stats', $stats ); -
/** * Filters the settings sections a plugin screen shows. */ apply_filters( 'wpsmarto_ls_page_sections', $sections, static::class ); -
/** * Filters extra own-account profile actions: name => {callback, password}. The * callback gets the WP_User and returns an array or a WP_Error. */ apply_filters( 'wpsmarto_ls_profile_actions', array() ); -
/** * Prints extra method rows (table rows) on the user's own profile. */ do_action( 'wpsmarto_ls_profile_method_rows', $user ); -
/** * Filters the destination for a user before the defaults apply. */ apply_filters( 'wpsmarto_ls_redirect_rule', '', $user, $type ); -
/** * Filters the extra login addresses. Each route needs an id and a slug. */ apply_filters( 'wpsmarto_ls_role_routes', array() ); -
/** * Fires at a named spot of a plugin screen while Pro is active. */ do_action( "wpsmarto_ls_screen_{$spot}" ); -
/** * Filters the Active Sessions columns. */ apply_filters( 'wpsmarto_ls_session_columns', $columns ); -
/** * Filters whether a user's sessions must come from the protected login flow. */ apply_filters( 'wpsmarto_ls_session_guarded', Two_Factor::required_for( $user ), $user ); -
/** * Fires when a session starts being tracked. */ do_action( 'wpsmarto_ls_session_started', (int) $id ); -
/** * Filters the status of an open session. */ apply_filters( 'wpsmarto_ls_session_status', 'active', $row ); -
/** * Filters session status labels. */ apply_filters( 'wpsmarto_ls_session_status_labels', array( 'active' => __( 'Signed in', 'smarto-login-security' ), 'expired' => __( 'Expired', 'smarto-login-security' ), 'ended' => __( 'Ended', 'smarto-login-security' ), ) ); -
/** * Filters the session list views (status => label). */ apply_filters( 'wpsmarto_ls_session_views', array( 'open' => __( 'Signed in', 'smarto-login-security' ), 'ended' => __( 'Ended', 'smarto-login-security' ), 'all' => __( 'All', 'smarto-login-security' ), ) ); -
/** * Filters the setting defaults. Add-ons add their own sections and keys here. */ apply_filters( 'wpsmarto_ls_setting_defaults', $defaults ); -
/** * Filters the settings sections. Add-ons add sections, or fields to a section, * here; each field needs a default in wpsmarto_ls_setting_defaults. */ apply_filters( 'wpsmarto_ls_settings_sections', $sections, $roles ); -
/** * Filters whether staff may sign in from a context while they are limited to * the custom login URL. */ apply_filters( 'wpsmarto_ls_staff_login_allowed', $allowed, $context ); -
/** * Filters addresses already used by other login routes. */ apply_filters( 'wpsmarto_ls_taken_login_slugs', array() ); -
/** * Filters whether a user may sign in from an IP address. */ apply_filters( 'wpsmarto_ls_user_allowed_from_ip', true, $user, $ip ); -
/** * Filters a section's values before they are saved. */ apply_filters( "wpsmarto_ls_validate_{$section}", $clean, $previous ); -
/** * Filters the visitor's two-letter country code stored with events. */ apply_filters( 'wpsmarto_ls_visitor_country', $code ); -
apply_filters( 'https_local_ssl_verify', false ); -
apply_filters( 'login_redirect', '' !== $requested ? $requested : $default, $requested, $user ); -
apply_filters( 'session_token_manager', 'WP_User_Meta_Session_Tokens' ); -
apply_filters( 'wpsmarto_ls_license_url', 'https://wpsmarto.com/dashboard' ); -
apply_filters( 'wpsmarto_ls_pro_active', false );
Generated from Smarto Login 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: