LLMS_Person_Handler::get_login_fields( string $layout = 'columns' )

Get the fields for the login form


Description Description


Parameters Parameters

$layout

(string) (Optional) form layout [columns|stacked]

Default value: 'columns'


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/class.llms.person.handler.php

	public static function get_login_fields( $layout = 'columns' ) {

		$gen_usernames = ( 'yes' === get_option( 'lifterlms_registration_generate_username' ) );

		return apply_filters( 'lifterlms_person_login_fields', array(
			array(
				'columns' => ( 'columns' == $layout ) ? 6 : 12,
				'id' => 'llms_login',
				'label' => $gen_usernames ? __( 'Email Address', 'lifterlms' ) : __( 'Username or Email Address', 'lifterlms' ),
				'last_column' => ( 'columns' == $layout ) ? false : true,
				'required' => true,
				'type'  => $gen_usernames ? 'email' : 'text',
			),
			array(
				'columns' => ( 'columns' == $layout ) ? 6 : 12,
				'id' => 'llms_password',
				'label' => __( 'Password', 'lifterlms' ),
				'last_column' => ( 'columns' == $layout ) ? true : true,
				'required' => true,
				'type'  => 'password',
			),
			array(
				'columns' => ( 'columns' == $layout ) ? 3 : 12,
				'classes' => 'llms-button-action',
				'id' => 'llms_login_button',
				'value' => __( 'Login', 'lifterlms' ),
				'last_column' => ( 'columns' == $layout ) ? false : true,
				'required' => false,
				'type'  => 'submit',
			),
			array(
				'columns' => ( 'columns' == $layout ) ? 6 : 6,
				'id' => 'llms_remember',
				'label' => __( 'Remember me', 'lifterlms' ),
				'last_column' => false,
				'required' => false,
				'type'  => 'checkbox',
			),
			array(
				'columns' => ( 'columns' == $layout ) ? 3 : 6,
				'id' => 'llms_lost_password',
				'last_column' => true,
				'description' => '<a href="' . esc_url( llms_lostpassword_url() ) . '">' . __( 'Lost your password?', 'lifterlms' ) . '</a>',
				'type' => 'html',
				'wrapper_classes' => 'align-right',
			),
		) );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.