Skip to content

Function

Register the blog signup form.

tml_ms_register_blog_signup_form( )

Source

function tml_ms_register_blog_signup_form() {

    tml_register_form(
        'blog_signup',
        array(
            'action'      => tml_get_action_url( 'signup' ),
            'attributes'  => array(
                'id' => 'setupform',
            ),
            'render_args' => array(
                'show_links' => false,
            ),
        )
    );

    tml_add_form_field(
        'blog_signup',
        'stage',
        array(
            'type'     => 'hidden',
            'value'    => 'validate-blog-signup',
            'priority' => 5,
        )
    );
    tml_add_form_field(
        'blog_signup',
        'user_name',
        array(
            'type'     => 'hidden',
            'priority' => 5,
        )
    );
    tml_add_form_field(
        'blog_signup',
        'user_email',
        array(
            'type'     => 'hidden',
            'priority' => 5,
        )
    );

    tml_add_form_field(
        'blog_signup',
        'signup_hidden_fields',
        array(
            'type'        => 'action',
            'render_args' => array( 'validate-site' ),
        )
    );

    tml_ms_add_blog_signup_form_fields( 'blog_signup' );

    tml_add_form_field(
        'blog_signup',
        'submit',
        array(
            'type'     => 'submit',
            'value'    => __( 'Sign up' ), // phpcs:ignore WordPress.WP.I18n.MissingArgDomain -- reusing WP core's translated string (see wp-signup.php), not a TML-specific string.
            'priority' => 30,
        )
    );
}

Uses

Used by

Changelog

VersionDescription
7.0 Introduced.