Theme My Login icon
Membership & Users

Theme My Login hooks reference

  • By Jeff Farthing
  • v7.3.1
  • Updated

Theme My Login 7.3.1 has 25 actions and 62 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 Theme My Login fires an action
add_action( 'login_enqueue_scripts', function() {
	// Your code runs here.
}, 10, 1 );

// Change a value Theme My Login is about to use
add_filter( 'add_signup_meta', 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

  • includes/ms-functions.php line 615 · used in 3 places
    /**
     * This filter is documented in wp-signup.php
     */
    apply_filters( 'add_signup_meta', array() );
  • includes/actions.php line 502 · used in 2 places
    /**
     * This filter is documented in wp-login.php
     */
    apply_filters( 'login_redirect', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user );
  • includes/functions.php line 310
    /**
     * This action is documented in wp-login.php
     */
    do_action( 'login_enqueue_scripts' );
  • includes/actions.php line 400
    /**
     * This action is documented in wp-login.php
     */
    do_action( "login_form_{$action_name}" );
  • login_head

    action
    includes/functions.php line 347
    /**
     * This action is documented in wp-login.php
     */
    do_action( 'login_head' );
  • login_init

    action
    includes/actions.php line 395
    /**
     * This action is documented in wp-login.php
     */
    do_action( 'login_init' );
  • includes/actions.php line 632
    /**
     * This filter is documented in wp-login.php
     */
    apply_filters( 'logout_redirect', $redirect_to, $requested_redirect_to, $user );
  • lost_password

    action
    includes/actions.php line 761
    /**
     * This filter is documented in wp-login.php
     */
    do_action( 'lost_password', tml_get_errors() );
  • includes/ms-functions.php line 1070
    /**
     * This filter is documented in wp-signup.php
     */
    apply_filters( 'signup_another_blog_init', compact( 'blogname', 'blog_title', 'errors' ) );
  • includes/ms-functions.php line 1021
    /**
     * This filter is documented in wp-signup.php
     */
    apply_filters( 'signup_blog_init', compact( 'user_name', 'user_email', 'blogname', 'blog_title', 'errors' ) );
  • includes/ms-functions.php line 717
    /**
     * This filter is documented in wp-signup.php
     */
    apply_filters( 'signup_create_blog_meta', $blog_meta_defaults );
  • includes/ms-functions.php line 1167
    /**
     * This filter is documented in wp-signup.php
     */
    apply_filters( 'signup_get_available_languages', get_available_languages() );
  • includes/ms-functions.php line 971
    /**
     * This filter is documented in wp-signup.php
     */
    apply_filters( 'signup_user_init', compact( 'user_name', 'user_email', 'errors' ) );
  • includes/actions.php line 421
    /**
     * Fires when a TML action is being requested.
     */
    do_action( "tml_action_{$action_name}" );
  • includes/actions.php line 412
    /**
     * Fires when a TML action is being requested.
     */
    do_action( "tml_action_ajax_{$action_name}" );
  • includes/actions.php line 205
    /**
     * Filter whether an action exists or not.
     */
    apply_filters( 'tml_action_exists', $exists, $action );
  • tml_activate

    action
    includes/class-theme-my-login.php line 282
    /**
     * Fires when the plugin is being activated.
     */
    do_action( 'tml_activate' );
  • includes/class-theme-my-login-extension.php line 420
    /**
     * Fires when the extension is being activated.
     */
    do_action( "tml_activate_{$slug}" );
  • includes/class-theme-my-login-extension.php line 409
    /**
     * Fires when an extension is being activated.
     */
    do_action( 'tml_activate_extension', $this->get_name() );
  • admin/settings.php line 273
    /**
     * Filters the settings fields.
     */
    apply_filters( 'tml_admin_get_settings_fields', $fields );
  • admin/settings.php line 96
    /**
     * Filters the settings sections.
     */
    apply_filters( 'tml_admin_get_settings_sections', array( 'tml_settings_general' => array( 'title' => __( 'General', 'theme-my-login' ), 'callback' => '__return_null', 'page' => 'theme-my-login', ), 'tml_settings_login' => array( 'title' => __( 'Log In' ), 'callback' => '__return_null', 'page' => 'theme-my-login', ), 'tml_settings_registration' => array( 'title' => __( 'Registration', 'theme-my-login' ), 'callback' => 'tml_admin_setting_callbac... );
  • admin/class-theme-my-login-admin.php line 146
    /**
     * Fires when TML Admin has been initialized.
     */
    do_action( 'tml_admin_init', $this );
  • includes/class-theme-my-login-form.php line 644
    /**
     * Filter the content after the form.
     */
    apply_filters( 'tml_after_form', $output, $this->name, $this );
  • includes/class-theme-my-login-form-field.php line 740
    /**
     * Filter the content after the field.
     */
    apply_filters( 'tml_after_form_field', $output, $this->form->get_name(), $this->name, $this );
  • includes/functions.php line 1189
    /**
     * Filters the AJAX error data.
     */
    apply_filters( 'tml_ajax_error_data', $data );
  • includes/functions.php line 1169
    /**
     * Filters the AJAX success data.
     */
    apply_filters( 'tml_ajax_success_data', $data );
  • includes/options.php line 216
    /**
     * Filter whether users should be logged in after registration or not.
     */
    apply_filters( 'tml_allow_auto_login', $auto_login );
  • includes/options.php line 196
    /**
     * Filter whether users can set their own password upon registration or not.
     */
    apply_filters( 'tml_allow_user_passwords', $user_passwords );
  • tml_autofocus

    filter
    includes/functions.php line 282
    /**
     * Filter whether to autofocus the primary field on TML forms.
     */
    apply_filters( 'tml_autofocus', true );
  • includes/class-theme-my-login-form.php line 627
    /**
     * Filter the content before the form.
     */
    apply_filters( 'tml_before_form', $output, $this->name, $this );
  • includes/class-theme-my-login-form-field.php line 608
    /**
     * Filter the content before the field.
     */
    apply_filters( 'tml_before_form_field', $output, $this->form->get_name(), $this->name, $this );
  • includes/class-theme-my-login.php line 296
    /**
     * Fires when the plugin is being deactivated.
     */
    do_action( 'tml_deactivate' );
  • includes/class-theme-my-login-extension.php line 447
    /**
     * Fires when the extension is being deactivated.
     */
    do_action( "tml_deactivate_{$slug}" );
  • includes/class-theme-my-login-extension.php line 436
    /**
     * Fires when an extension is being deactivated.
     */
    do_action( 'tml_deactivate_extension', $this->get_name() );
  • includes/extensions.php line 88
    /**
     * Filter whether an extension exists or not.
     */
    apply_filters( 'tml_extension_exists', $exists, $extension );
  • includes/class-theme-my-login-action.php line 310
    /**
     * Filter the action slug.
     */
    apply_filters( 'tml_get_action_slug', $this->slug, $this->get_name() );
  • includes/class-theme-my-login-action.php line 188
    /**
     * Filter the action title.
     */
    apply_filters( 'tml_get_action_title', $this->title, $this->get_name() );
  • includes/class-theme-my-login-action.php line 368
    /**
     * Filter the action URL.
     */
    apply_filters( 'tml_get_action_url', $url, $this->get_name(), $scheme, $network );
  • includes/class-theme-my-login-form.php line 167
    /**
     * Filters the form action.
     */
    apply_filters( 'tml_get_form_action', $this->action, $this );
  • includes/class-theme-my-login-form-field.php line 359
    /**
     * Filters the form field content.
     */
    apply_filters( 'tml_get_form_field_content', $content, $this );
  • includes/class-theme-my-login-form-field.php line 303
    /**
     * Filters the form field description.
     */
    apply_filters( 'tml_get_form_field_description', $this->description, $this );
  • includes/class-theme-my-login-form-field.php line 275
    /**
     * Filters the form field label.
     */
    apply_filters( 'tml_get_form_field_label', $this->label, $this );
  • includes/class-theme-my-login-form-field.php line 387
    /**
     * Filters the form field options.
     */
    apply_filters( 'tml_get_form_field_options', $this->options, $this );
  • includes/class-theme-my-login-form.php line 197
    /**
     * Filters the form method.
     */
    apply_filters( 'tml_get_form_method', $this->method, $this );
  • includes/options.php line 101
    /**
     * Filter the login type.
     */
    apply_filters( 'tml_get_login_type', $login_type );
  • includes/options.php line 154
    /**
     * Filter the registration type.
     */
    apply_filters( 'tml_get_registration_type', $registration_type );
  • tml_init

    action
    includes/class-theme-my-login.php line 346
    /**
     * Fires when TML has been initialized.
     */
    do_action( 'tml_init', $this );
  • tml_is_action

    filter
    includes/actions.php line 236
    /**
     * Filter whether a TML action is being requested or not.
     */
    apply_filters( 'tml_is_action', $is_action, $action );
  • includes/ms-functions.php line 1251
    /**
     * Filters the URL to redirect to after activation.
     */
    apply_filters( 'tml_ms_activation_redirect', $activation_redirect, $result['user_id'], isset( $result['blog_id'] ) ? $result['blog_id'] : null );
  • includes/functions.php line 212
    /**
     * Filters the template hierarchy used for TML pages.
     */
    apply_filters( 'tml_page_templates', $templates );
  • includes/ms-functions.php line 570
    /**
     * Filter whether to redirect subsite signup to network signup or not.
     */
    apply_filters( 'tml_redirect_subsite_to_network_signup', true );
  • includes/class-theme-my-login.php line 89
    /**
     * Fires after registering an action.
     */
    do_action( 'tml_registered_action', $action->get_name(), $action );
  • includes/class-theme-my-login.php line 225
    /**
     * Fires after registering an extension.
     */
    do_action( 'tml_registered_extension', $extension->get_name(), $extension );
  • includes/class-theme-my-login.php line 159
    /**
     * Fires after registering a form.
     */
    do_action( 'tml_registered_form', $form->get_name(), $form );
  • includes/actions.php line 687
    /**
     * Filter the registration redirect.
     */
    apply_filters( 'tml_registration_redirect', $redirect_to, get_userdata( $user_id ) );
  • includes/class-theme-my-login-form.php line 601
    /**
     * Fires before rendering a form.
     */
    do_action( 'tml_render_form', $this->name, $this );
  • includes/class-theme-my-login-form-field.php line 588
    /**
     * Fires before a form field is rendered.
     */
    do_action( 'tml_render_form_field', $this->form->get_name(), $this->name, $this );
  • includes/functions.php line 291
    /**
     * Filter the main TML script data.
     */
    apply_filters( 'tml_script_data', array( 'action' => tml_is_action() ? tml_get_action()->get_name() : '', 'errors' => tml_get_errors()->get_error_codes(), 'autofocus' => $autofocus, 'showPasswordLabel' => __( 'Show password' ), 'hidePasswordLabel' => __( 'Hide password' ), 'ajaxErrorMessage' => __( 'An error occurred while processing your request. Please try again later.' ), ) );
  • includes/functions.php line 271
    /**
     * Filter the dependencies of the main TML script.
     */
    apply_filters( 'tml_script_dependencies', $dependencies );
  • includes/functions.php line 958
    /**
     * Filters whether to send the new user admin notification or not.
     */
    apply_filters( 'tml_send_new_user_admin_notification', true );
  • includes/functions.php line 949
    /**
     * Filters whether to send the new user notification or not.
     */
    apply_filters( 'tml_send_new_user_notification', true );
  • tml_shortcode

    filter
    includes/shortcodes.php line 134
    /**
     * Filter the shortcode content.
     */
    apply_filters( 'tml_shortcode', $content, $action->get_name(), $atts );
  • includes/class-theme-my-login-widget.php line 54
    /**
     * Filters whether to show the widget or not.
     */
    apply_filters( 'tml_show_widget', $show_widget, $instance );
  • tml_use_ajax

    filter
    includes/options.php line 81
    /**
     * Filter whether forms should use AJAX or not.
     */
    apply_filters( 'tml_use_ajax', $use_ajax );
  • includes/class-theme-my-login-widget.php line 83
    /**
     * Filters the size of the avatar shwon in the widget when logged in.
     */
    apply_filters( 'tml_widget_avatar_size', 64 );
  • includes/class-theme-my-login-widget.php line 146
    /**
     * Fires at the end of the logged in widget.
     */
    do_action( 'tml_widget_user_panel', $instance );
  • includes/actions.php line 871
    /**
     * This action is documented in wp-login.php
     */
    do_action( 'user_request_action_confirmed', $request_id );
  • includes/actions.php line 827
    /**
     * This action is documented in wp-login.php
     */
    do_action( 'validate_password_reset', $errors, $user );
  • admin/settings.php line 715
    /**
     * This filter is documented in wp-admin/options.php
     */
    apply_filters( 'whitelist_options', array() );
  • includes/actions.php line 585
    /**
     * This filter is documented in wp-login.php
     */
    apply_filters( 'wp_login_errors', $errors, $redirect_to );
  • includes/functions.php line 1206
    /**
     * This filter is documented in wp-includes/pluggable.php
     */
    apply_filters( 'wp_safe_redirect_fallback', admin_url(), 302 );
  • includes/actions.php line 648
    /**
     * This filter is documented in wp-login.php
     */
    apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) );
  • includes/ms-functions.php line 1187
    /**
     * This filter is documented in wp-signup.php
     */
    apply_filters( 'wpmu_active_signup', get_site_option( 'registration', 'none' ) );
  • includes/ms-functions.php line 729 · used in 2 places
    do_action( 'preprocess_signup_form' );
  • admin/settings.php line 718
    apply_filters( 'allowed_options', $whitelist_options );
  • login_errors

    filter
    includes/class-theme-my-login-form.php line 423
    apply_filters( 'login_errors', implode( "</li>\n<li class=\"tml-error\">", $errors ) );
  • includes/class-theme-my-login-form.php line 430
    apply_filters( 'login_messages', implode( "</li>\n<li class=\"tml-message\">", $messages ) );
  • includes/forms.php line 347
    apply_filters( 'lostpassword_redirect', tml_get_request_value( 'redirect_to' ) );
  • includes/forms.php line 271
    apply_filters( 'registration_redirect', tml_get_request_value( 'redirect_to' ) );
  • includes/forms.php line 538
    apply_filters( 'tml_form_exists', array_key_exists( $form, tml_get_forms() ) );
  • includes/functions.php line 860
    apply_filters( 'tml_get_username_label', $label, $action );
  • widget_title

    filter
    includes/class-theme-my-login-widget.php line 65
    apply_filters( 'widget_title', $title, $instance, $this->id_base );

Generated from Theme My Login'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: