function _geshifilter_get_tags in GeSHi Filter for syntax highlighting 5.2
Same name and namespace in other branches
- 6 geshifilter.inc \_geshifilter_get_tags()
- 7 geshifilter.inc \_geshifilter_get_tags()
Helper function for gettings the tags (with caching)
7 calls to _geshifilter_get_tags()
- _geshifilter_codefilter_conflicts in ./
geshifilter.conflicts.inc - conflict detection for codefilter
- _geshifilter_filter_tips in ./
geshifilter.filtertips.inc - Implementation for geshifilter_filter_tips()
- _geshifilter_parse_attributes in ./
geshifilter.pages.inc - Helper function for parsing the attributes of GeSHi code tags to get the settings for language and line numbers.
- _geshifilter_prepare in ./
geshifilter.pages.inc - geshifilter_filter callback for preparing input text.
- _geshifilter_prepare_callback in ./
geshifilter.pages.inc - _geshifilter_prepare callback for preparing input text. Replaces the code tags brackets with geshifilter specific ones to prevent possible messing up by other filters, e.g. '[python]foo[/python]' to…
File
- ./
geshifilter.inc, line 114
Code
function _geshifilter_get_tags($format) {
static $geshifilter_tags_cache = array();
if (!isset($geshifilter_tags_cache[$format])) {
$generic_code_tags = _geshifilter_tag_split(geshifilter_tags($format));
$language_tags = array();
$tag_to_lang = array();
$enabled_languages = _geshifilter_get_enabled_languages();
foreach ($enabled_languages as $language => $fullname) {
$lang_tags = _geshifilter_tag_split(geshifilter_language_tags($language, $format));
foreach ($lang_tags as $lang_tag) {
$language_tags[] = $lang_tag;
$tag_to_lang[$lang_tag] = $language;
}
}
$geshifilter_tags_cache[$format] = array(
$generic_code_tags,
$language_tags,
$tag_to_lang,
);
}
return $geshifilter_tags_cache[$format];
}