/** * Return singleton instance * * @param integer $max_age * @return ICE_Webfont */ public function instance($max_age = 86400) { if (!self::$instance instanceof ICE_Webfont) { self::$instance = new ICE_Webfont($max_age); } return self::$instance; }
/** */ public function get_template_vars() { // get parent vars $parent_vars = parent::get_template_vars(); // build up local vars $local_vars = array('webfont_url' => ICE_Webfont::instance(0)->url); // return parent and local vars merged return array_merge($parent_vars, $local_vars); }
<?php ICE_Loader::load('utils/webfont'); ?> <div id="typography-ff"></div> <script type="text/javascript"> (function($){ var options = {}; // add application options options.jsonUrl = '<?php print ICE_Webfont::instance(0)->url; ?> '; options.slantText = '<?php _e('Slant', infinity_text_domain); ?> '; options.serviceText = '<?php _e('Service', infinity_text_domain); ?> '; options.variantText = '<?php _e('Thickness', infinity_text_domain); ?> '; options.subsetText = '<?php _e('Script', infinity_text_domain); ?> '; options.match =
<?php ICE_Loader::load('utils/webfont'); ?> <div id="typography-ff"></div> <script type="text/javascript"> (function($){ var options = {}; // add application options options.jsonUrl = '<?php print ICE_Webfont::instance(0)->get_property('url'); ?> '; options.slantText = '<?php _e('Slant', infinity_text_domain); ?> '; options.serviceText = '<?php _e('Service', infinity_text_domain); ?> '; options.variantText = '<?php _e('Thickness', infinity_text_domain); ?> '; options.subsetText = '<?php _e('Script', infinity_text_domain); ?> '; options.match =