LLMS_Form_Templates::get_template( string $location )

Retrieve the block template HTML for a given location.


Parameters Parameters

$location

(string) (Required) Form location. Accepts "checkout", "registration", or "account".


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/forms/class-llms-form-templates.php

		 * @since 5.0.0
		 *
		 * @param boolean $use_reusable Whether or not to use reusable blocks.
		 */
		$use_reusable = apply_filters( 'llms_blocks_template_use_reusable_blocks', ( 'not-set' === get_option( 'lifterlms_registration_generate_username', 'not-set' ) ) );

		$blocks = self::get_template_blocks( $location, $use_reusable );

		return serialize_blocks( $blocks );
	}

	/**
	 * Retrieve a list of blocks for the given template
	 *
	 * @since 5.0.0
	 *
	 * @param string  $location Form location id.
	 * @param boolean $reusable Whether or not reusable blocks should be used.
	 * @return array[]
	 */

Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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