Template_Tag_WYSIWYG_Field::print_single_input_template()

Prints a single input template.

Description

Source

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

	protected function print_single_input_template() {
		?>
		<div class="template-tag-list-wrap">
			<button type="button" class="template-tag-list-toggle button" aria-controls="{{ data.inputAttrs.id }}-template-tag-list" aria-expanded="false">
				<span aria-hidden="true">+</span>
				<span class="screen-reader-text"><?php _e( 'Insert template tag', 'torro-forms' ); ?></span>
			</button>
			<ul id="{{ data.inputAttrs.id }}-template-tag-list" class="template-tag-list" role="region" tabindex="-1">
				<# _.each( data.templateTags, function( groupData, groupSlug ) { #>
					<li class="template-tag-list-group template-tag-list-group-{{ groupSlug }}">
						<span>{{ groupData.label }}</span>
						<ul>
							<# _.each( groupData.tags, function( tagLabel, tagSlug ) { #>
								<li class="template-tag">
									<button type="button" class="template-tag-button" data-tag="{{ tagSlug }}">
										{{ tagLabel }}
									</button>
								</li>
							<# } ) #>
						</ul>
					</li>
				<# } ) #>
			</ul>
		</div>
		<?php
		parent::print_single_input_template();
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.