Template_Tag_WYSIWYG_Field::enqueue()

Enqueues the necessary assets for the field.

Description

Return

(array) Array where the first element is an array of script handles and the second element is an associative array of data to pass to the main script.

Source

File: src/components/template-tag-wysiwyg-field.php

	public function enqueue() {
		$ret = parent::enqueue();

		if ( Template_Tag_Text_Field::has_enqueued() ) {
			return $ret;
		}

		$assets = $this->manager->assets();

		$assets->enqueue_script( 'template-tag-fields' );
		$assets->enqueue_style( 'template-tag-fields' );

		self::$enqueued = true;

		return $ret;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.