/** *Automatically load assests like fonts into your frontend **/ public function load_shortcode_assets() { $output = ""; foreach (AviaBuilder::$resources_to_load as $element) { if ($element['type'] == 'iconfont') { $output .= avia_font_manager::load_font($element); } } echo $output; }
/** *Automatically load assests like fonts into your frontend **/ public function load_shortcode_assets() { $output = ""; $output .= avia_font_manager::load_font(); /* if the builder is decoupled from the theme then make sure to only load iconfonts if they are actually necessary. in enfolds case it is foreach(AviaBuilder::$resources_to_load as $element) { if($element['type'] == 'iconfont') { $output .= avia_font_manager::load_font(); } } */ echo $output; }