public function add_script_load_url($urls) { $hub = Upfront_PublicScripts_Registry::get_instance(); $scripts = $hub->get_all(); if (empty($scripts)) { return $urls; } $ckey = $this->_cache->key(self::TYPE_SCRIPT, $scripts); $raw_cache_key = $ckey->get_hash(); $cache = $this->_debugger->is_active() ? false : $this->_cache->get($ckey); if (empty($cache)) { foreach ($scripts as $key => $frags) { $path = upfront_element_dir($frags[0], $frags[1]); if (file_exists($path)) { $cache .= "/* {$key} */\n" . file_get_contents($path) . "\n"; } } $this->_cache->set($ckey, $cache); } $url = Upfront_VirtualPage::get_url(join('/', array('upfront-dependencies', 'scripts', $raw_cache_key))); $urls[] = $url; return $urls; }
public static function list_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; echo upfront_get_template('upfront-comment-list', array('comment' => $comment, 'args' => $args, 'depth' => $depth), upfront_element_dir('templates/upfront-comment-list.php', __DIR__)); }