bootstrap_icons(); $bi_array = array(); foreach( $menu_ico as $icons ){ $cont = str_replace("\\","&#x",$icons[2]).';'; $ico_class = str_replace("bi-","",$icons[1]); $bi_array[$icons[1]] = $ico_class .' '. $cont; } return $bi_array; } /** * Get icons control default settings. * * Retrieve the default settings of the icons control. Used to return the default * settings while initializing the icons control. * * @since 1.0.0 * @access protected * * @return array Control default settings. */ protected function get_default_settings() { return [ 'options' => self::get_icons(), 'include' => '', 'exclude' => '', ]; } /** * Render icons 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(); ?>
<# if ( data.description ) { #>
{{ data.description }}
<# } #>