llms_get_privacy_notice( bool $merge = false )

Retrieve the text/html for the custom privacy policy notice


Parameters Parameters

$merge

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

Default value: false


Top ↑

Return Return

(string)


Top ↑

Source Source

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

function llms_get_privacy_notice( $merge = false ) {

	$text = get_option( 'llms_privacy_notice', esc_html__( 'Your personal data will be used to process your enrollment, support your experience on this website, and for other purposes described in our {{policy}}.', 'lifterlms' ) );

	$ret = $text;

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

		// Only merge if we some text saved & a page set.
		if ( $text && get_option( 'wp_page_for_privacy_policy', false ) ) {
			$ret = str_replace( '{{policy}}', llms_get_option_page_anchor( 'wp_page_for_privacy_policy' ), $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_privacy_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.