Lazy_String::__construct( callable $callback, string|false $escape_callback = 'esc_html' )

Lazy_String constructor.


Parameters

$callback

(callable) (Required) The callback that will be used to populate the string on the first fetch.

$escape_callback

(string|false) (Optional) The callback that will be used to escape the string in the escaped method.

Default value: 'esc_html'


Top ↑

Source

File: src/Tribe/Utils/Lazy_String.php

	public function __construct( callable $callback, $escape_callback = 'esc_html' ) {
		$this->value_callback  = $callback;
		$this->escape_callback = $escape_callback;
	}