[], 'multiple' => false, // Select2 library options 'select2options' => [], // the lockedOptions array can be passed option keys. The passed option keys will be non-deletable. 'lockedOptions' => [], ]; } /** * 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 * @access public */ public function content_template() { ?>
<# if ( data.label ) {#> <# } #>
<# var multiple = ( data.multiple ) ? 'multiple' : ''; #>
<# if ( data.description ) { #>
{{{ data.description }}}
<# } #>