[],
'multiple' => false,
'select2options' => [],
];
}
/**
* Render select2 control output in the editor.
*
* Used to generate the control HTML in the editor using Underscore JS
* template. The variables for the class are available using `data` JS
* object.
*
* @since 1.0.0
*/
public function contentTemplate()
{
$control_uid = $this->getControlUid(); ?>
<#
if (data.select2options.tags && !data.multiple && Object.keys(data.options).indexOf(data.controlValue) < 0) {
data.options[data.controlValue] = data.controlValue;
}
#>
<# if ( data.label ) { #>
<# } #>
<# if ( data.select2options.ajax ) { #>
<# } #>