Skip to content

Function

Get a form.

tml_get_form( string|Theme_My_Login_Form $form = '' )

Parameters

$form string|Theme_My_Login_Form Default ''
Optional. The form name or object.

Return

Theme_My_Login_Form|bool The form object or false if it doesn't exist.

Source

function tml_get_form( $form = '' ) {

    if ( $form instanceof Theme_My_Login_Form ) {
        return $form;
    }

    if ( empty( $form ) ) {
        $action = tml_get_action();
        if ( $action ) {
            $form = $action->get_name();
        }
    }

    return theme_my_login()->get_form( $form );
}

Uses

Used by

Changelog

VersionDescription
7.0 Introduced.