/** * Gets all the possible {filedir_X} tags and their replacement URLs. * * @static * @access private * @return array */ private static function _get_file_tags($sort = FALSE) { if (!isset(self::$_file_tags)) { $tags = array(); $urls = array(); if ($file_paths = get_instance()->functions->fetch_file_paths()) { if ($sort) { uasort($file_paths, array('Wygwam_helper', '_cmp_file_urls')); } foreach ($file_paths as $id => $url) { // ignore "/" URLs if ($url == '/') { continue; } $tags[] = LD . 'filedir_' . $id . RD; $urls[] = $url; } } self::$_file_tags = array($tags, $urls); } return self::$_file_tags; }