json['icons'] = \Kirki\Util\Dashicons::get_icons(); } /** * An Underscore (JS) template for this control's content (but not its container). * * Class variables for this control class are available in the `data` JS object; * export custom variables by overriding {@see WP_Customize_Control::to_json()}. * * @see WP_Customize_Control::print_template() * * @access protected * @since 1.0 * @return void */ protected function content_template() { ?> <# if ( data.label ) { #>{{{ data.label }}}<# } #> <# if ( data.description ) { #>{{{ data.description }}}<# } #>
<# if ( ! _.isUndefined( data.choices ) && 1 < _.size( data.choices ) ) { #> <# for ( key in data.choices ) { #> checked="checked"<# } #>> <# } #> <# } else { #> <# var dashiconSections = { 'admin-menu': '', 'welcome-screen': '', 'post-formats': '', 'media': '', 'image-editing': '', 'tinymce': 'TinyMCE', 'posts': '', 'sorting': '', 'social': '', 'wordpress_org': 'WordPress', 'products': '', 'taxonomies': '', 'widgets': '', 'notifications': '', 'misc': '' }; #> <# _.each( dashiconSections, function( sectionLabel, sectionKey ) { #>

{{ sectionLabel }}

<# for ( key in data.icons[ sectionKey ] ) { #> checked="checked"<# } #>> <# } #> <# }); #> <# } #>