llms_get_terms_notice( bool $merge = false )

Retrieve the text/html for the custom t&c notice


Parameters Parameters

$merge

(bool) (Optional) If true, will merge {{terms}} to an HTML anchor. Uses lifterlms_terms_page_id for page ID & title

Default value: false


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/functions/llms.functions.privacy.php

function llms_get_terms_notice( $merge = false ) {

	// Get the option.
	$text = get_option( 'llms_terms_notice' );

	// Fallback to default if no option set.
	if ( ! $text ) {
		$text = esc_html__( 'I have read and agree to the {{terms}}.', 'lifterlms' );
	}

	$ret = $text;

	// Merge the {{terms}} code.
	if ( $merge ) {

		// Only merge if we have a page set.
		if ( get_option( 'lifterlms_terms_page_id', false ) ) {
			$ret = str_replace( '{{terms}}', llms_get_option_page_anchor( 'lifterlms_terms_page_id' ), $ret );
			// Otherwise return empty string.
		} else {
			$ret = '';
		}

		$ret = wp_kses(
			$ret,
			array(
				'a'      => array(
					'href'   => array(),
					'target' => array(),
				),
				'b'      => array(),
				'em'     => array(),
				'i'      => array(),
				'strong' => array(),
			)
		);
	}

	return apply_filters( 'llms_get_terms_notice', $ret, $text );

}


Top ↑

Changelog Changelog

Changelog
Version Description
3.18.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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