WP 2FA icon
Security

WP 2FA hooks reference

  • By Melapress
  • v4.3.0 New
  • Updated

WP 2FA 4.3.0 has 64 actions and 138 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.

functions.phpyour child theme
// Run your own code when WP 2FA fires an action
add_action( 'login_footer', function() {
	// Your code runs here.
}, 10, 1 );

// Change a value WP 2FA is about to use
add_filter( 'login_redirect', function( $redirect_to, $arg2, $user ) {
	// Change $redirect_to here.
	return $redirect_to;
}, 10, 3 );

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

  • includes/classes/Admin/Methods/passkeys/class-ajax-passkeys.php line 394 · used in 6 places
    /**
     * Filters the login redirect URL.
     */
    apply_filters( 'login_redirect', $redirect_to, '', $user );
  • includes/classes/Admin/class-profile-section-renderer.php line 371 · used in 4 places
    /**
     * This filter is documented in class-user-profile.php
     */
    apply_filters( "{WP_2FA_PREFIX}enable_2fa_user_setting", true, $user->ID );
  • login_errors

    filter
    includes/functions/login-header.php line 194 · used in 4 places
    /**
     * Filters the error messages displayed above the login form.
     */
    apply_filters( 'login_errors', $errors );
  • includes/classes/Admin/class-profile-section-renderer.php line 307 · used in 3 places
    /**
     * This filter is documented in class-user-profile.php
     */
    apply_filters( "{WP_2FA_PREFIX}append_to_profile_form_content", $form_content, $user );
  • includes/classes/Admin/class-profile-section-renderer.php line 374 · used in 3 places
    /**
     * This filter is documented in class-user-profile.php
     */
    apply_filters( "{WP_2FA_PREFIX}enable_2fa_user_setting_description", '' );
  • includes/classes/Admin/Methods/class-email-wizard-steps.php line 248 · used in 3 places
    /**
     * Filter to check if the interface has to disable this method.
     */
    apply_filters( "{WP_2FA_PREFIX}method_settings_disabled", false, self::$main_class, $role );
  • includes/classes/Admin/Settings/templates/policies/_policy-fields.php line 124 · used in 3 places
    /**
     * Allow extensions to register their primary methods.
     */
    apply_filters( "{WP_2FA_PREFIX}methods_policy_settings_new", $all_methods, $policy_role );
  • includes/classes/Authenticator/class-login.php line 2128 · used in 3 places
    /**
     * Changes the remember me value.
     */
    apply_filters( "{WP_2FA_PREFIX}rememberme", $requested );
  • includes/classes/Admin/class-profile-section-renderer.php line 452 · used in 2 places
    /**
     * Add an option for external providers to add their own form buttons.
     */
    apply_filters( "{WP_2FA_PREFIX}additional_form_buttons", $extra_buttons );
  • includes/classes/Admin/class-settings-page.php line 312 · used in 2 places
    /**
     * Fires after the main menu settings are registered.
     */
    do_action( "{WP_2FA_PREFIX}after_admin_menu_created", self::TOP_MENU_SLUG, false );
  • includes/classes/Admin/Settings/templates/policies/_policy-fields.php line 327 · used in 2 places
    /**
     * Fires after the primary methods sortable list, allowing extensions to append
     * items.
     */
    do_action( "{WP_2FA_PREFIX}after_primary_methods_toggles", $policy_role );
  • includes/classes/Admin/Settings/templates/policies/_policy-fields.php line 433 · used in 2 places
    /**
     * Fires after the secondary methods, allowing extensions to add more.
     */
    do_action( "{WP_2FA_PREFIX}after_secondary_methods_toggles", $policy_role );
  • includes/classes/Admin/SettingsPages/class-settings-page-passkeys.php line 569 · used in 2 places
    /**
     * Notify the extensions and 3rd party developers that the settings array is
     * saved.
     */
    do_action( "{WP_2FA_PREFIX}after_settings_save", Settings_Utils::get_option( WP_2FA_POLICY_SETTINGS_NAME, array() ) );
  • includes/classes/Admin/Views/class-first-time-wizard-steps.php line 608 · used in 2 places
    /**
     * Via that, you can change the grace period TTL.
     */
    apply_filters( "{WP_2FA_PREFIX}allow_grace_period_in_seconds", false );
  • includes/classes/Admin/SettingsPages/class-settings-page-policies.php line 105 · used in 2 places
    /**
     * Fires before the plugin settings rendering.
     */
    do_action( "{WP_2FA_PREFIX}before_plugin_settings" );
  • includes/classes/Admin/SettingsPages/class-settings-page-passkeys.php line 163 · used in 2 places
    /**
     * Fires before the plugin settings rendering.
     */
    do_action( "{WP_2FA_PREFIX}before_plugin_settings_passkeys" );
  • includes/classes/Admin/SettingsPages/class-settings-page-white-label.php line 236 · used in 2 places
    /**
     * Filter the values we are about to store in the plugin settings.
     */
    apply_filters( "{WP_2FA_PREFIX}filter_output_content_white_label", $output, $input );
  • includes/classes/Admin/SettingsPages/class-settings-page-email.php line 507 · used in 2 places
    /**
     * Filter the values we are about to store in the plugin settings.
     */
    apply_filters( "{WP_2FA_PREFIX}filter_output_email_template_content", $output );
  • includes/classes/Admin/SettingsPages/class-settings-page-passkeys.php line 146 · used in 2 places
    /**
     * Used from user settings controller.
     */
    apply_filters( "{WP_2FA_PREFIX}roles_controller_exists", false );
  • includes/classes/Authenticator/class-login.php line 510 · used in 2 places
    /**
     * The filter can be user to skip the 2FA "login" form in some cases. For
     * example if the user has set their device as trusted.
     */
    apply_filters( "{WP_2FA_PREFIX}skip_2fa_login_form", false, $user );
  • includes/classes/Admin/Methods/class-totp.php line 804 · used in 2 places
    /**
     * Changing the title of the login screen for the TOTP method.
     */
    apply_filters( "{WP_2FA_PREFIX}totp_title", $site_name . ':' . User_Helper::get_user_object()->user_login, User_Helper::get_user_object() );
  • includes/classes/Admin/class-wizard-integration.php line 162 · used in 2 places
    /**
     * Action: wp_2fa_wizard_enqueue_assets
     */
    do_action( "{WP_2FA_PREFIX}wizard_enqueue_assets", $plugin_url, $version, self::SCRIPT_HANDLE );
  • includes/classes/Admin/class-wizard-integration.php line 772 · used in 2 places
    /**
     * Action: wp_2fa_wizard_print_templates
     */
    do_action( "{WP_2FA_PREFIX}wizard_print_templates" );
  • includes/classes/Admin/class-wizard-integration.php line 756 · used in 2 places
    /**
     * Filter: wp_2fa_wizard_templates
     */
    apply_filters( "{WP_2FA_PREFIX}wizard_templates", $templates );
  • includes/classes/Licensing/class-freemius-provider.php line 873
    /**
     * Notifies the freemius helper the the library is loaded.
     */
    do_action( "{Licensing_Factory::FREEMIUS_INTERNAL_SLUG}_freemius_loaded" );
  • includes/classes/class-wp2fa.php line 1561
    /**
     * Allows 3rd party providers to add their own actions to the check.
     */
    apply_filters( "{WP_2FA_PREFIX}actions_check", $actions_array );
  • includes/classes/Admin/class-user-profile.php line 568
    /**
     * Add an option for external providers to add their own wizard steps.
     */
    do_action( "{WP_2FA_PREFIX}additional_settings_steps" );
  • includes/classes/Admin/Views/class-first-time-wizard-steps.php line 116
    /**
     * Fires after the backup methods HTML rendering is finished.
     */
    do_action( "{WP_2FA_PREFIX}after_backup_methods_setup", $setup_wizard, $data_role, null );
  • includes/classes/Admin/Views/class-first-time-wizard-steps.php line 656
    /**
     * Fires after the grace period. Gives the ability to change the parsed code.
     */
    apply_filters( "{WP_2FA_PREFIX}after_grace_period", '', '', 'wp_2fa_policy' );
  • includes/classes/Admin/Helpers/class-user-helper.php line 1746
    /**
     * Allow 3rd party developers to execute additional code when grace period
     * expires (account is locked)
     */
    do_action( "{WP_2FA_PREFIX}after_grace_period_expired", self::get_user() );
  • includes/classes/Admin/Settings/templates/policies/_policy-fields.php line 873
    /**
     * Fires at the end of the User access settings tab.
     */
    do_action( "{WP_2FA_PREFIX}after_sitewide_policies", $policy_role );
  • includes/classes/Authenticator/class-login.php line 1428
    /**
     * Filters the providers a user may be challenged with at login.
     */
    apply_filters( "{WP_2FA_PREFIX}allowed_login_providers", array_values( array_unique( $allowed ) ), $user );
  • includes/classes/Authenticator/class-login.php line 1973
    /**
     * Filters whether a provider has authenticated the user. This is a secondary
     * gate that can override the result of the validation filter.
     */
    apply_filters( "{WP_2FA_PREFIX}authenticated_login_form", $authenticated, $user, $provider );
  • includes/classes/Admin/Controllers/class-methods.php line 63
    /**
     * Add an option for external providers to implement their own 2fa methods and
     * set them as available.
     */
    apply_filters( "{WP_2FA_PREFIX}available_2fa_methods", $available_methods, $role );
  • includes/classes/Admin/Controllers/class-settings.php line 363
    /**
     * Extensions could change the enabled backup methods array.
     */
    apply_filters( "{WP_2FA_PREFIX}backup_methods_enabled", $backup_methods, $user );
  • includes/classes/Admin/Controllers/class-settings.php line 324
    /**
     * Gives the ability to add additional backup methods
     */
    apply_filters( "{WP_2FA_PREFIX}backup_methods_list", array() );
  • includes/classes/Admin/SettingsPages/class-settings-page-policies.php line 140
    /**
     * Fires before grace period HTML rendering settings.
     */
    do_action( "{WP_2FA_PREFIX}before_grace_period_settings" );
  • includes/classes/Admin/SettingsPages/class-settings-page-policies.php line 972
    /**
     * Fires after the grace period. Gives the ability to change the parsed code.
     */
    apply_filters( "{WP_2FA_PREFIX}before_grace_period_settings", '', '', 'wp_2fa_policy' );
  • includes/classes/Admin/SettingsPages/class-settings-page-policies.php line 589
    /**
     * Allow extensions and 3rd party developers to change or check the settings
     * array.
     */
    apply_filters( "{WP_2FA_PREFIX}before_settings_save", $output );
  • includes/classes/Admin/SettingsPages/class-settings-page-policies.php line 150
    /**
     * Fires before user profile period HTML rendering settings.
     */
    do_action( "{WP_2FA_PREFIX}before_user_profile_settings" );
  • includes/classes/Admin/class-user-profile.php line 1021
    /**
     * Gives the ability to remove the "Remove" button from the user profile page.
     */
    apply_filters( "{WP_2FA_PREFIX}can_user_remove_2fa", \true, $user_id );
  • includes/classes/Authenticator/class-code-guard.php line 275
    /**
     * Filters how long a freshly sent one-time code suppresses another send.
     */
    apply_filters( "{WP_2FA_PREFIX}code_resend_debounce", self::DEFAULT_DEBOUNCE );
  • includes/classes/Admin/Helpers/class-file-writer.php line 702
    /**
     * Gives the ability to manually change the path to the config file.
     */
    apply_filters( "{WP_2FA_PREFIX}config_file_path", (string) $path );
  • includes/classes/Admin/Settings/templates/customize-code-page.php line 245
    /**
     * Filter to add more customizable content dialogs on the 2FA code page. Each
     * dialog should have a unique setting key and an array of options which should
     * include: 'label' (string) - The label for the dialog, shown in the settings
     * page. 'description' (string) - A description for the dialog, shown in the
     * settings page. 'type' (string) - The type of input to use in the settings
     * page. Can be 'text' o...
     */
    apply_filters( "{WP_2FA_PREFIX}customizable_content_dialogs", $customized_content_dialogs );
  • includes/classes/class-wp2fa.php line 170
    /**
     * Gives the ability to filter the default settings array of the plugin
     */
    apply_filters( "{WP_2FA_PREFIX}default_settings", self::$default_settings );
  • includes/classes/Admin/SettingsPages/class-settings-page-policies.php line 1047
    /**
     * Gives the ability to manipulate the output.
     */
    apply_filters( "{WP_2FA_PREFIX}disable_2fa", $output );
  • includes/classes/Admin/SettingsPages/class-settings-page-email.php line 229
    /**
     * Add an option for external providers to implement their own email template
     * settings for the settings tab.
     */
    apply_filters( "{WP_2FA_PREFIX}email_notification_definitions", $result );
  • includes/classes/Admin/Helpers/class-email-templates.php line 154
    /**
     * Add an option for external providers to implement their own email template
     * settings for the settings tab.
     */
    apply_filters( "{WP_2FA_PREFIX}email_templates", $internal_mapping );
  • includes/classes/Admin/SettingsPages/class-settings-page-policies.php line 572
    /**
     * Filter the values we are about to store in the plugin settings.
     */
    apply_filters( "{WP_2FA_PREFIX}filter_output_content", $output, $input );
  • includes/classes/Admin/SettingsPages/class-settings-page-general.php line 181
    /**
     * Filter the values we are about to store in the plugin settings.
     */
    apply_filters( "{WP_2FA_PREFIX}filter_output_content_general_settings", $output, $input );
  • includes/classes/Authenticator/class-login.php line 572
    /**
     * Allows 3rd parties to render something at the end of the existing grace
     * form.
     */
    do_action( "{WP_2FA_PREFIX}grace_html_before_end", $user );
  • includes/classes/Admin/SettingsPages/class-settings-page-policies.php line 1001
    /**
     * Gives the ability to manipulate the output.
     */
    apply_filters( "{WP_2FA_PREFIX}grace_period", $output );
  • includes/functions/core.php line 96
    /**
     * Fires when plugin is initiated.
     */
    do_action( "{WP_2FA_PREFIX}init" );
  • includes/classes/Utils/class-user-utils.php line 81
    /**
     * Filter that gives methods ability to make themselves enforced even the
     * global enforcement is off.
     */
    apply_filters( "{WP_2FA_PREFIX}is_method_enforced", true, $user );
  • includes/classes/Admin/class-setup-wizard.php line 334
    /**
     * Gives the ability to change the default JS wizard settings.
     */
    apply_filters( "{WP_2FA_PREFIX}js_wizard_settings", $data_array );
  • includes/functions/core.php line 46
    /**
     * Fires after the plugin is loaded.
     */
    do_action( "{WP_2FA_PREFIX}loaded" );
  • includes/classes/Utils/class-debugging.php line 106
    /**
     * Enables / Disables the logging for the plugin.
     */
    apply_filters( "{WP_2FA_PREFIX}logging_enabled", false );
  • includes/classes/Authenticator/class-login.php line 1176
    /**
     * Allows 3rd parties to render something before the login button on the 2FA
     * "login" form.
     */
    do_action( "{WP_2FA_PREFIX}login_before_submit_button", $user, $provider );
  • includes/classes/Authenticator/class-login.php line 1189
    /**
     * Using that filter, the default text of the login button could be changed
     */
    apply_filters( "{WP_2FA_PREFIX}login_button_text", \esc_html__( 'Log In', 'wp-2fa' ) );
  • includes/classes/Authenticator/class-login.php line 1165
    /**
     * Gives the ability to remove the submit button from the plugin forms
     */
    apply_filters( "{WP_2FA_PREFIX}login_disable_submit_button", false, $user, $provider );
  • includes/classes/Authenticator/class-login.php line 1154
    /**
     * Allows 3rd parties to render their own 2FA "login" form.
     */
    do_action( "{WP_2FA_PREFIX}login_form", $user, $provider, $login_nonce );
  • includes/classes/Authenticator/class-login.php line 1261
    /**
     * Allows 3rd parties to render something after the backup methods.
     */
    do_action( "{WP_2FA_PREFIX}login_html_after_backup_providers", $user, $provider, $login_nonce, $redirect_to, $rememberme );
  • includes/classes/Authenticator/class-login.php line 1223
    /**
     * Allows 3rd parties to render something at the end of the existing login
     * form.
     */
    do_action( "{WP_2FA_PREFIX}login_html_before_end", $user, $provider, $login_nonce );
  • includes/classes/Authenticator/class-login.php line 1479
    /**
     * Filters the URL the second authentication step posts back to.
     */
    apply_filters( "{WP_2FA_PREFIX}login_url", $base, $params, $scheme );
  • includes/classes/Admin/SettingsPages/class-settings-page-general.php line 95
    /**
     * Gives the ability to change the default general settings.
     */
    apply_filters( "{WP_2FA_PREFIX}loop_general_settings", $simple_settings_we_can_loop );
  • includes/classes/Admin/SettingsPages/class-settings-page-policies.php line 303
    /**
     * Gives the ability to filter the settings array of the plugin.
     */
    apply_filters( "{WP_2FA_PREFIX}loop_settings", $simple_settings_we_can_loop );
  • includes/classes/Admin/Helpers/class-email-templates.php line 453
    /**
     * Allows 3rd party providers to their own settings for the mail templates.
     */
    apply_filters( "{WP_2FA_PREFIX}mail_default_settings", $default_settings );
  • includes/classes/Admin/Settings/templates/policies/_policy-fields.php line 195
    /**
     * Allow extensions to register additional checkbox keys managed by this form.
     */
    apply_filters( "{WP_2FA_PREFIX}managed_checkbox_keys", $managed_checkbox_keys, $policy_role );
  • includes/classes/Admin/Helpers/class-methods-helper.php line 140
    /**
     * Shows methods in order. Every method is called and its code and order is
     * collected. That is used when there are no methods selected from the user.
     */
    apply_filters( "{WP_2FA_PREFIX}methods_modal_options", array(), $role );
  • includes/classes/Admin/class-user-profile.php line 515
    /**
     * Adds an option for external providers to add their own 2fa methods options.
     * And sorts them (our logic).
     */
    do_action( "{WP_2FA_PREFIX}methods_options" );
  • includes/classes/Admin/Helpers/class-methods-helper.php line 99
    /**
     * Option to re-configure the methods - all the methods are called and their
     * order and code is collected. Then the currently selected method is
     * positioned on top and methods are shown in order. That is called in the user
     * profile page.
     */
    apply_filters( "{WP_2FA_PREFIX}methods_re_configure", array(), $role );
  • includes/classes/Admin/class-user-profile.php line 548
    /**
     * Add an option for external providers to add their own reconfigure methods
     * options.
     */
    do_action( "{WP_2FA_PREFIX}methods_reconfigure_options" );
  • includes/classes/Admin/Helpers/class-methods-helper.php line 174
    /**
     * Shows methods in order. Every method is called and its code and order is
     * collected. Used in the wizards.
     */
    apply_filters( "{WP_2FA_PREFIX}methods_settings", array(), $setup_wizard, $data_role, $role );
  • includes/classes/Admin/Views/class-first-time-wizard-steps.php line 74
    /**
     * Fired right after the TOTP method HTML rendering.
     */
    do_action( "{WP_2FA_PREFIX}methods_setup", $setup_wizard, $data_role, null );
  • includes/classes/Admin/class-user-profile.php line 595
    /**
     * Add an option for external providers to add their own 2fa methods options.
     */
    do_action( "{WP_2FA_PREFIX}methods_wizards" );
  • includes/classes/Admin/Views/class-wizard-steps.php line 389
    /**
     * Add an option for external providers to add their own modal methods options.
     */
    do_action( "{WP_2FA_PREFIX}modal_methods", $user );
  • includes/classes/Authenticator/class-reset-password.php line 322
    /**
     * Using that filter, the default text of the login button could be changed
     */
    apply_filters( "{WP_2FA_PREFIX}new_password_button_text", \esc_html__( 'Get New Password', 'wp-2fa' ) );
  • includes/classes/Admin/SettingsPages/class-settings-page-policies.php line 341
    /**
     * No methods are enabled - return the previous selection. Gives the ability
     * for external providers to set the default values.
     */
    apply_filters( "{WP_2FA_PREFIX}no_method_enabled", $output );
  • includes/classes/Admin/SettingsPages/class-settings-page-policies-new.php line 137
    /**
     * Fires after the core policies-new scripts are enqueued.
     */
    do_action( "{WP_2FA_PREFIX}policies_new_enqueue_scripts", $hook );
  • includes/classes/class-wp2fa.php line 1507
    /**
     * Extensions could change the stored settings value, based on custom /
     * different / specific for role settings.
     */
    apply_filters( "{WP_2FA_PREFIX}policy_settings", self::$plugin_settings[ WP_2FA_POLICY_SETTINGS_NAME ] );
  • includes/classes/Admin/Controllers/class-methods.php line 188
    /**
     * Filters the list of primary method setting keys to check.
     */
    apply_filters( "{WP_2FA_PREFIX}primary_method_keys", $primary_method_keys );
  • templates/profile/card-backup.php line 56
    /**
     * Action: wp_2fa_profile_backup_card_buttons
     */
    do_action( "{WP_2FA_PREFIX}profile_backup_card_buttons", $backup, $data['user'] );
  • includes/classes/Admin/class-profile-section-renderer.php line 170
    /**
     * Action: wp_2fa_profile_enqueue_assets
     */
    do_action( "{WP_2FA_PREFIX}profile_enqueue_assets", $plugin_url, $version, $is_frontend );
  • includes/classes/Admin/class-profile-section-renderer.php line 155
    /**
     * Filter: wp_2fa_profile_localized_data
     */
    apply_filters( "{WP_2FA_PREFIX}profile_localized_data", $localized );
  • includes/classes/Admin/class-profile-section-renderer.php line 218
    /**
     * Filter: wp_2fa_profile_template_data
     */
    apply_filters( "{WP_2FA_PREFIX}profile_template_data", $data, $user, $user_type );
  • includes/classes/Admin/class-profile-section-renderer.php line 231
    /**
     * Filter: wp_2fa_profile_template_file
     */
    apply_filters( "{WP_2FA_PREFIX}profile_template_file", $template_file );
  • includes/classes/Admin/Controllers/class-settings.php line 550
    /**
     * Filter the supplied providers.
     */
    apply_filters( "{WP_2FA_PREFIX}providers", self::$all_providers );
  • includes/classes/Admin/Controllers/class-settings.php line 516
    /**
     * Filter the supplied providers.
     */
    apply_filters( "{WP_2FA_PREFIX}providers_translated_names", self::$all_providers_names_translated );
  • includes/classes/Admin/SettingsPages/class-settings-page-policies.php line 920
    /**
     * Gives the ability to manipulate the output.
     */
    apply_filters( "{WP_2FA_PREFIX}redirect_after", $output );
  • includes/classes/Admin/Controllers/class-api-login.php line 212
    /**
     * Fires when the user is authenticated.
     */
    do_action( "{WP_2FA_PREFIX}remember_device", $user, $remember_device );
  • includes/classes/Admin/Helpers/class-email-templates.php line 178
    /**
     * 3rd party plugins could change the mail strings, or provide their own.
     */
    apply_filters( "{WP_2FA_PREFIX}replacement_email_strings", self::get_mail_template_tags( false, $user_id, $token, $override_grace_period ) );
  • includes/classes/class-wp2fa.php line 1040
    /**
     * 3rd party plugins could change this to their own.
     */
    apply_filters( "{WP_2FA_PREFIX}replacement_reconfigure_strings", $replacements );
  • includes/classes/class-wp2fa.php line 1124
    /**
     * 3rd party plugins could change the mail strings, or provide their own.
     */
    apply_filters( "{WP_2FA_PREFIX}replacement_wizard_strings", $replacements );
  • includes/classes/Admin/SettingsPages/class-settings-page-policies.php line 562
    /**
     * Allow extensions and 3rd party developers to run extra validation of the
     * output array.
     */
    do_action( "{WP_2FA_PREFIX}run_extra_settings_validation", $output );
  • includes/classes/Admin/SettingsPages/class-settings-page-policies.php line 271
    /**
     * At this point, none of the default providers is set / activated. This filter
     * allows additional providers to change the behavior. Checking the input array
     * for specific values (methods), and based on that we can raise error that
     * none of the allowed methods has bees selected by the user, or dismiss the
     * error otherwise.
     */
    apply_filters( "{WP_2FA_PREFIX}save_additional_enabled_methods", true, $input );
  • includes/classes/Admin/Views/class-first-time-wizard-steps.php line 139
    /**
     * At this point, none of the default providers is set / activated. This filter
     * allows additional providers to change the behavior. Checking the input array
     * for specific values (methods), and based on that we can raise error that
     * none of the allowed methods has bees selected by the user, or dismiss the
     * error otherwise.
     */
    apply_filters( "{WP_2FA_PREFIX}select_methods", $output, $setup_wizard );
  • includes/classes/Admin/Helpers/class-user-helper.php line 1757
    /**
     * Filter can be used to disable the email notification about locked user
     * account.
     */
    apply_filters( "{WP_2FA_PREFIX}send_account_locked_notification", true, self::get_user() );
  • includes/classes/class-wp2fa.php line 788
    /**
     * Extensions could change the extracted value, based on custom / different /
     * specific for role settings.
     */
    apply_filters( "{WP_2FA_PREFIX}setting_generic", $value, $setting_name, $role );
  • includes/classes/Admin/SettingsPages/class-settings-page-render.php line 186
    /**
     * Filter: `Settings tabs`
     */
    apply_filters( "{WP_2FA_PREFIX}settings_tabs", $settings_tabs );
  • includes/classes/Admin/class-setup-wizard.php line 389
    /**
     * Gives the ability for 3rd party scripts to add their own JS to the plugin
     * setup page.
     */
    do_action( "{WP_2FA_PREFIX}setup_page_scripts" );
  • includes/classes/Shortcodes/class-shortcodes.php line 99
    /**
     * Fires when the FE shortcode scripts are registered.
     */
    do_action( "{WP_2FA_PREFIX}shortcode_scripts", true );
  • includes/classes/Admin/Helpers/class-user-helper.php line 1721
    /**
     * Filter can be used to prevent locking of the user account when the grace
     * period expires.
     */
    apply_filters( "{WP_2FA_PREFIX}should_account_be_locked_on_grace_period_expiration", true, self::get_user() );
  • includes/classes/class-wp2fa.php line 1219
    /**
     * Allows 3rd party providers to remove the redirecting. check.
     */
    apply_filters( "{WP_2FA_PREFIX}should_redirect_unconfigured", true );
  • includes/classes/Authenticator/class-code-guard.php line 187
    /**
     * Filters the maximum attempted SMS setup sends per network per hour.
     */
    apply_filters( "{WP_2FA_PREFIX}sms_setup_hourly_limit", 100 );
  • includes/classes/Admin/Helpers/class-sms-templates.php line 98
    /**
     * Add an option for external providers to implement their own sms template
     * settings for the settings tab.
     */
    apply_filters( "{WP_2FA_PREFIX}sms_templates", $internal_mapping );
  • includes/classes/Authenticator/class-authentication.php line 344
    /**
     * That allows to change the amount of thick for decrypting the key.
     */
    apply_filters( "{WP_2FA_PREFIX}totp_time_step_allowance", self::DEFAULT_TIME_STEP_ALLOWANCE );
  • includes/classes/Admin/class-settings-page.php line 602
    /**
     * Gives the ability for extensions to set their settings in the plugin.
     */
    do_action( "{WP_2FA_PREFIX}update_network_settings" );
  • includes/classes/Authenticator/class-login.php line 2093
    /**
     * Fires when the user is authenticated.
     */
    do_action( "{WP_2FA_PREFIX}user_authenticated", $user );
  • includes/classes/Admin/SettingsPages/class-settings-page-policies.php line 878
    /**
     * Gives the ability to manipulate the output.
     */
    apply_filters( "{WP_2FA_PREFIX}user_profile_settings", $output );
  • includes/classes/Authenticator/class-login.php line 1961
    /**
     * Allows providers to validate their 2FA "login" form. Providers should return
     * true on successful validation, or call exit on failure (e.g. to re-display
     * the login form with an error message). Default-deny: if no provider signals
     * success, authentication is rejected.
     */
    apply_filters( "{WP_2FA_PREFIX}validate_login_form", $authenticated, $user, $provider );
  • includes/classes/Utils/class-white-label.php line 286
    /**
     * Gives the ability to filter the default settings array of the plugin
     */
    apply_filters( "{WP_2FA_PREFIX}white_label_default_settings", self::$default_settings );
  • includes/classes/Admin/SettingsPages/class-settings-page-white-label.php line 610
    /**
     * Gives the ability for the 3rd party extensions to add additional white label
     * settings
     */
    do_action( "{WP_2FA_PREFIX}white_labeling_settings_page_after_code_page" );
  • includes/classes/Admin/SettingsPages/class-settings-page-white-label.php line 640
    /**
     * Fires after the white label settings tab is rendered.
     */
    do_action( "{WP_2FA_PREFIX}white_labeling_settings_page_after_default_text" );
  • includes/classes/Admin/SettingsPages/class-settings-page-white-label.php line 564
    /**
     * Fires right before the white label settings tab HTML rendering.
     */
    do_action( "{WP_2FA_PREFIX}white_labeling_settings_page_before_default_text" );
  • includes/classes/Admin/SettingsPages/class-settings-page-white-label.php line 547
    /**
     * Fires right before the white label settings tab HTML, handles tabbed nav.
     */
    do_action( "{WP_2FA_PREFIX}white_labeling_tabbed_navigation" );
  • includes/classes/class-wp2fa.php line 1527
    /**
     * Extensions could change the stored settings value, based on custom /
     * different / specific for role settings.
     */
    apply_filters( "{WP_2FA_PREFIX}whitelabel_settings", self::$plugin_settings[ \WP_2FA_WHITE_LABEL_SETTINGS_NAME ] );
  • includes/classes/Admin/class-setup-wizard.php line 235
    /**
     * Filter: `Wizard Default Steps`
     */
    apply_filters( "{WP_2FA_PREFIX}wizard_default_steps", $wizard_steps );
  • includes/classes/Admin/class-wizard-integration.php line 217
    /**
     * Filter: wp_2fa_wizard_enabled_methods
     */
    apply_filters( "{WP_2FA_PREFIX}wizard_enabled_methods", $enabled_methods, $user, $role );
  • includes/classes/Admin/class-wizard-integration.php line 645
    /**
     * Filter: wp_2fa_wizard_i18n_strings
     */
    apply_filters( "{WP_2FA_PREFIX}wizard_i18n_strings", $strings );
  • includes/classes/Admin/class-wizard-integration.php line 526
    /**
     * Filter: wp_2fa_wizard_localized_data
     */
    apply_filters( "{WP_2FA_PREFIX}wizard_localized_data", $data, $user, $role );
  • includes/classes/Admin/class-wizard-integration.php line 252
    /**
     * Filter: wp_2fa_wizard_method_descriptions
     */
    apply_filters( "{WP_2FA_PREFIX}wizard_method_descriptions", $method_descs, $user, $role );
  • includes/classes/Admin/class-wizard-integration.php line 282
    /**
     * Filter: wp_2fa_wizard_method_hints
     */
    apply_filters( "{WP_2FA_PREFIX}wizard_method_hints", $method_hints, $user, $role );
  • includes/classes/Admin/class-wizard-integration.php line 234
    /**
     * Filter: wp_2fa_wizard_method_labels
     */
    apply_filters( "{WP_2FA_PREFIX}wizard_method_labels", $method_labels, $user, $role );
  • includes/classes/Admin/class-wizard-integration.php line 448
    /**
     * Filter: wp_2fa_wizard_reconfigure_intros
     */
    apply_filters( "{WP_2FA_PREFIX}wizard_reconfigure_intros", $reconfigure_intros, $user, $role );
  • includes/classes/Admin/class-wizard-integration.php line 461
    /**
     * Filter: wp_2fa_wizard_reconfigure_intros_unavailable
     */
    apply_filters( "{WP_2FA_PREFIX}wizard_reconfigure_intros_unavailable", $reconfigure_intros_unavailable, $user, $role );
  • includes/classes/Admin/class-wizard-integration.php line 474
    /**
     * Filter: wp_2fa_wizard_unavailable_methods
     */
    apply_filters( "{WP_2FA_PREFIX}wizard_unavailable_methods", $unavailable_methods, $user, $role );
  • includes/classes/class-wp2fa.php line 1350
    /**
     * The WooCommerce 2FA endpoint is missing on this site. Return true once the
     * rewrite rules have been rebuilt, so the redirect may be tried once more.
     */
    apply_filters( "{WP_2FA_PREFIX}woocommerce_endpoint_missing", false, $url );
  • includes/classes/Admin/Migrations/class-wordfence-login-security.php line 589
    /**
     * Fires once a user's Wordfence enrolment has been re-created in WP 2FA.
     */
    do_action( "{WP_2FA_PREFIX}wordfence_user_migrated", $user );
  • includes/classes/Licensing/class-edd-plugin-updater.php line 598
    /**
     * Filters the parameters sent in the API request.
     */
    apply_filters( 'edd_sl_plugin_updater_api_params', $api_params, self::$api_data, self::$plugin_file );
  • includes/functions/login-header.php line 141
    /**
     * Filters the login page body classes.
     */
    apply_filters( 'login_body_class', $classes, $action );
  • includes/functions/login-header.php line 80
    /**
     * Enqueue scripts and styles for the login page.
     */
    do_action( 'login_enqueue_scripts' );
  • login_head

    action
    includes/functions/login-header.php line 86
    /**
     * Fires in the login page header after scripts are enqueued.
     */
    do_action( 'login_head' );
  • login_header

    action
    includes/functions/login-header.php line 151
    /**
     * Fires in the login page header after the body tag is opened.
     */
    do_action( 'login_header' );
  • includes/functions/login-header.php line 109
    /**
     * Filters the title attribute of the header logo above login form.
     */
    apply_filters( 'login_headertitle', $login_header_title );
  • includes/functions/login-header.php line 101
    /**
     * Filters link URL of the header logo above login form.
     */
    apply_filters( 'login_headerurl', $login_header_url );
  • login_message

    filter
    includes/functions/login-header.php line 164
    /**
     * Filters the message to display above the login form.
     */
    apply_filters( 'login_message', $message );
  • includes/functions/login-header.php line 204
    /**
     * Filters instructional messages displayed above the login form.
     */
    apply_filters( 'login_messages', $messages );
  • login_title

    filter
    includes/functions/login-header.php line 51
    /**
     * Filters the title tag content for login page.
     */
    apply_filters( 'login_title', $login_title, $title );
  • includes/classes/Authenticator/class-reset-password.php line 285
    /**
     * Filters the URL redirected to after submitting the
     * lostpassword/retrievepassword form.
     */
    apply_filters( 'lostpassword_redirect', $lostpassword_redirect );
  • includes/classes/Licensing/class-edd-plugin-updater.php line 111
    /**
     * Fires after the $edd_plugin_data is setup.
     */
    do_action( 'post_edd_sl_plugin_updater_setup', $edd_plugin_data );
  • includes/functions/login-header.php line 36
    /**
     * Filters the error codes array for shaking the login form.
     */
    apply_filters( 'shake_error_codes', $shake_error_codes );
  • includes/classes/Admin/Methods/passkeys/class-passkeys-rate-limiter.php line 141
    /**
     * Filters the client address the passkey rate limiter keys on.
     */
    apply_filters( 'wp_2fa_passkeys_client_ip', (string) $ip );
  • includes/classes/Admin/Methods/passkeys/class-passkeys-rate-limiter.php line 163
    /**
     * Filters the reverse proxies whose X-Forwarded-For header is trusted.
     */
    apply_filters( 'wp_2fa_passkeys_trusted_proxies', array() );
  • includes/classes/Utils/class-request-utils.php line 73
    /**
     * Exact proxy IP addresses authorized to supply X-Forwarded-For.
     */
    apply_filters( 'wp_2fa_trusted_proxies', array() );
  • wp_logout

    action
    includes/classes/Admin/Helpers/class-ajax-helper.php line 597
    /**
     * Fires after a user is logged out.
     */
    do_action( 'wp_logout', $user_id );
  • includes/classes/Admin/Controllers/class-api-login.php line 88 · used in 5 places
    do_action( 'wp_login_failed', $user->user_login, new \WP_Error( 'authentication_failed', __( 'Invalid verification code.', 'wp-2fa' ) ) );
  • includes/classes/Admin/SettingsPages/class-settings-page-passkeys.php line 415 · used in 2 places
    do_action( "{WP_2FA_PREFIX}change_referer" );
  • includes/classes/Admin/Methods/passkeys/class-ajax-passkeys.php line 366 · used in 2 places
    do_action( "{WP_2FA_PREFIX}passkey_login", $user );
  • includes/classes/Admin/SettingsPages/class-settings-page-policies-new.php line 387 · used in 2 places
    do_action( "{WP_2FA_PREFIX}policies_new_ajax_save", \wp_unslash( $_POST ) );
  • includes/classes/Admin/Controllers/class-api-login.php line 233 · used in 2 places
    apply_filters( "{WP_2FA_PREFIX}post_login_user_redirect", $redirect_to, $user );
  • includes/classes/Admin/class-setup-wizard.php line 390 · used in 2 places
    do_action( 'admin_print_styles' );
  • includes/classes/Admin/Methods/passkeys/class-pending-2fa-helper.php line 531 · used in 2 places
    apply_filters( 'wp_2fa_is_challenge_request', false );
  • includes/classes/Admin/Methods/passkeys/class-ajax-passkeys.php line 82 · used in 2 places
    apply_filters( 'wp_2fa_passkeys_rl_max_body_bytes', Passkeys_Rate_Limiter::MAX_BODY_BYTES );
  • includes/classes/Admin/Methods/passkeys/class-passkeys-rate-limiter.php line 260 · used in 2 places
    apply_filters( 'wp_2fa_passkeys_rl_window', self::DEFAULT_WINDOW, $action );
  • includes/classes/Admin/Fly-Out/class-flyout.php line 45
    apply_filters( "{\WP_2FA_PREFIX}flyout_remote_config_url", 'https://melapress.com/downloads/plugins-files/wp-2fa-flyout-config.php' );
  • includes/classes/Licensing/class-edd-provider.php line 1096
    apply_filters( "{self::AJAX_PREFIX}provider_available", true );
  • includes/classes/Utils/class-user-utils.php line 156
    apply_filters( "{WP_2FA_PREFIX}additional_user_types", $user_type, $user );
  • includes/classes/Admin/Helpers/class-user-helper.php line 389
    do_action( "{WP_2FA_PREFIX}after_method_is_removed", self::get_user() );
  • includes/classes/Admin/Controllers/class-endpoints.php line 151
    apply_filters( "{WP_2FA_PREFIX}api_endpoints", self::$endpoints );
  • includes/classes/Admin/SettingsPages/class-settings-page-email.php line 623
    apply_filters( "{WP_2FA_PREFIX}append_to_email_and_sms_template_settings", '' );
  • includes/classes/Admin/Views/class-first-time-wizard-steps.php line 204
    apply_filters( "{WP_2FA_PREFIX}backup_methods", $output, $setup_wizard );
  • includes/classes/Admin/Helpers/class-user-helper.php line 336
    do_action( "{WP_2FA_PREFIX}before_method_been_set", self::get_enabled_method_for_user( self::get_user() ), self::get_user() );
  • includes/classes/Admin/Helpers/class-user-helper.php line 377
    do_action( "{WP_2FA_PREFIX}before_method_is_removed", self::get_enabled_method_for_user( self::get_user() ), self::get_user() );
  • includes/classes/Admin/Helpers/class-wp-helper.php line 196
    do_action( "{WP_2FA_PREFIX}critical_notice" );
  • includes/classes/Utils/class-debugging.php line 206
    apply_filters( "{WP_2FA_PREFIX}debug_log_retention", self::LOG_RETENTION );
  • includes/classes/Admin/class-setup-wizard.php line 727
    apply_filters( "{WP_2FA_PREFIX}email_code_period", $free_period );
  • includes/classes/Admin/Fly-Out/class-flyout.php line 410
    do_action( "{WP_2FA_PREFIX}flyout_remote_error", $message );
  • includes/classes/Admin/Fly-Out/class-flyout.php line 333
    apply_filters( "{WP_2FA_PREFIX}flyout_remote_request_args", array( 'timeout' => 30, 'redirection' => 5, 'user-agent' => 'WP-2FA-FlyOut/' . WP_2FA_VERSION, ) );
  • includes/classes/Admin/Fly-Out/class-flyout.php line 323
    apply_filters( "{WP_2FA_PREFIX}flyout_remote_timeout_ttl", HOUR_IN_SECONDS );
  • includes/classes/Admin/Settings/templates/general-settings.php line 55
    apply_filters( "{WP_2FA_PREFIX}general_settings_group", Settings_Page_New::register_general_settings( array() ) );
  • includes/classes/Admin/Settings/templates/plugins-integrations.php line 45
    apply_filters( "{WP_2FA_PREFIX}integrations_plugins_settings_group", array() );
  • includes/classes/Admin/Settings/templates/providers-integrations.php line 45
    apply_filters( "{WP_2FA_PREFIX}integrations_providers_settings_group", array() );
  • includes/classes/Admin/Helpers/class-user-helper.php line 1227
    do_action( "{WP_2FA_PREFIX}method_has_been_removed", self::get_user() );
  • includes/classes/Admin/Helpers/class-user-helper.php line 352
    do_action( "{WP_2FA_PREFIX}method_has_been_set", $method, self::get_user() );
  • includes/classes/Authenticator/class-login.php line 2031
    apply_filters( "{WP_2FA_PREFIX}post_login_orphan_user_redirect", $redirect_to, $user );
  • includes/functions/core.php line 1406
    apply_filters( "{WP_2FA_PREFIX}premium_badge_dialog_pages", $pages );
  • includes/classes/Admin/Settings/templates/customize-setup-wizard.php line 398
    apply_filters( "{WP_2FA_PREFIX}providers_settings_labels", array() );
  • includes/classes/Admin/Helpers/class-user-helper.php line 2705
    do_action( "{WP_2FA_PREFIX}remove_backup_methods_for_user", self::get_user() );
  • includes/classes/Authenticator/class-reset-password.php line 382
    apply_filters( "{WP_2FA_PREFIX}reset_account_source_quota", self::RESET_ACCOUNT_SOURCE_QUOTA, $user );
  • includes/classes/Authenticator/class-reset-password.php line 380
    apply_filters( "{WP_2FA_PREFIX}reset_code_quota", self::RESET_CODE_QUOTA, $user );
  • includes/classes/Authenticator/class-reset-password.php line 379
    apply_filters( "{WP_2FA_PREFIX}reset_code_window", self::RESET_CODE_WINDOW );
  • includes/classes/Authenticator/class-reset-password.php line 381
    apply_filters( "{WP_2FA_PREFIX}reset_source_quota", self::RESET_SOURCE_QUOTA );
  • includes/classes/Admin/SettingsPages/class-settings-page-new.php line 298
    do_action( "{WP_2FA_PREFIX}settings_new_ajax_save", \wp_unslash( $_POST ) );
  • includes/classes/Admin/SettingsPages/class-settings-page-new.php line 449
    apply_filters( "{WP_2FA_PREFIX}settings_new_validate", $out, $input );
  • includes/classes/Admin/Helpers/class-user-helper.php line 284
    apply_filters( "{WP_2FA_PREFIX}user_enabled_backup_methods", array(), $user );
  • includes/classes/Admin/Helpers/class-user-helper.php line 308
    apply_filters( "{WP_2FA_PREFIX}user_enabled_methods", self::get_meta( self::ENABLED_METHODS_META_KEY ), $user );
  • includes/classes/Admin/Helpers/class-ajax-helper.php line 246
    do_action( "{WP_2FA_PREFIX}user_is_unlocked", $user_obj );
  • includes/classes/Admin/Controllers/class-api-login.php line 188
    apply_filters( "{WP_2FA_PREFIX}validate_login_api", $valid, $user_id, $token, $provider );
  • includes/classes/Admin/Settings/templates/general-settings.php line 82
    apply_filters( "{WP_2FA_PREFIX}white_labelling_settings_group", Settings_Page_New::register_white_labelling_settings( array() ) );
  • includes/classes/Licensing/class-edd-plugin-updater.php line 698
    apply_filters( 'edd_sl_api_request_verify_ssl', true, static::class );
  • includes/classes/Licensing/class-edd-plugin-updater.php line 356
    do_action( "in_plugin_update_message-{$file}", $plugin, $plugin );
  • plugin_locale

    filter
    includes/functions/core.php line 79
    apply_filters( 'plugin_locale', \determine_locale(), 'wp-2fa' );
  • includes/classes/Authenticator/class-login.php line 898
    apply_filters( 'two_factor_user_api_login_enable', false, $user_id );
  • includes/classes/Admin/Methods/passkeys/class-pending-2fa-helper.php line 591
    do_action( 'wp_2fa_enforce_pending', $user_id, $payload );
  • includes/classes/Admin/Methods/passkeys/class-passkeys-rate-limiter.php line 287
    apply_filters( 'wp_2fa_passkeys_rl_account_max', self::DEFAULT_ACCOUNT_MAX, $action );
  • includes/classes/Admin/Methods/passkeys/class-passkeys-rate-limiter.php line 259
    apply_filters( 'wp_2fa_passkeys_rl_max', self::DEFAULT_MAX, $action );
  • includes/classes/Admin/Methods/passkeys/class-pending-2fa-helper.php line 555
    apply_filters( 'wp_2fa_pending_redirect_url', '', $user_id, $payload );
  • includes/classes/Admin/Methods/passkeys/class-pending-2fa-helper.php line 279
    apply_filters( 'wp_2fa_signin_pending_ttl', 600, $user_id );
  • includes/classes/Admin/Methods/passkeys/class-pending-2fa-helper.php line 222
    apply_filters( 'wp_authenticate_user', $user, '' );

Generated from WP 2FA'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: