public function registerCustomizerControl($wp_customize, $section, $priority = 1) { $this->create_select_options(); parent::registerCustomizerControl($wp_customize, $section, $priority); }
/** * Initialize the select2 field * * @since 1.9.3 * @return void */ public function init_select_script() { if (!self::$firstLoad) { return; } self::$firstLoad = false; ?> <script> jQuery( document ).ready( function () { 'use strict'; /** * Select2 * @see https://select2.github.io/ */ if ( jQuery().select2 ) { jQuery( 'select.tf-select, [class*="tf-select"] select' ).select2(); } }); </script> <?php }