true, 'multiple' => false, 'taxonomy' => false, 'post_type' => false, 'security' => wp_create_nonce( 'easyel_autocomplete_nonce' ), 'options' => [], 'callback' => '', ]; } /** * Enqueue control scripts and styles. * * @since 1.0.0 * @access public */ public function enqueue() { wp_enqueue_script( 'easyel-autocomplete-control', EASYELEMENTS_ASSETS_URL . 'js/easyel-autocomplete.js', [ 'jquery' ], EASYELEMENTS_VER, false ); wp_localize_script( 'easyel-autocomplete-control', 'easyel_custom_select_obj', [ 'security' => wp_create_nonce('easyel_autocomplete_nonce'), 'ajax_url' => admin_url('admin-ajax.php'), ] ); } /** * Render easyel_autocomplete 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() { $control_uid = $this->get_control_uid(); ?>