llms_get_login_form( $message = null,  $redirect = null,  $layout = 'columns' )


Source Source

File: includes/functions/llms-functions-forms.php

if ( ! function_exists( 'llms_get_login_form' ) ) {
	function llms_get_login_form( $message = null, $redirect = null, $layout = 'columns' ) {

		/**
		 * Filters whether or not the login form should be displayed
		 *
		 * By default, the registration form is hidden from logged-in users and
		 * displayed to logged out users.
		 *
		 * @since 4.16.0
		 * @since 5.0.0 Moved from template `global/form-login.php`/.
		 *
		 * @param boolean $hide_form Whether or not to hide the form. If `true`, the form is hidden, otherwise it is displayed.
		 */
		if ( apply_filters( 'llms_hide_login_form', is_user_logged_in() ) ) {
			return;
		}

		/**
		 * Customize the layout of the login form.
		 *
		 * @since Unknown
		 *
		 * @param string $layout Form layout. Accepts "columns" (default) for a side-by-side layout
		 *                       for form fields or "stacked" so fields sit on top of each other. Default is 'columns'.
		 */
		$layout = apply_filters( 'llms_login_form_layout', $layout );

		if ( ! empty( $message ) ) {
			llms_add_notice( $message, 'notice' );
		}

		$redirect = empty( $redirect ) ? get_permalink() : $redirect;

		llms_get_template( 'global/form-login.php', compact( 'message', 'redirect', 'layout' ) );


Top ↑

User Contributed Notes User Contributed Notes

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