BlockTypes; } function deactivate_ol() { $ol_triggers= array( "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" ); foreach ($ol_triggers as $key) { unset($this->BlockTypes[$key]); } } function add_language_to_link_target($href) { $f3 = \Base::instance(); $data = []; $base = substr($href,0,strpos($href,'?') ? : strlen($href)); parse_str(parse_url($href,PHP_URL_QUERY),$data); $fragment = parse_url($href,PHP_URL_FRAGMENT); if ($f3->get('LANG') != $f3->get('default_lang')) { if (!array_key_exists('lang',$data)) { $data['lang'] = $f3->get('LANG'); } } $new = $base; if (count($data) > 0) { $new .= "?" . http_build_query($data); } if ($fragment) { $new .= "#" . $fragment; } return $new; } protected function inlineEmailTag($Excerpt) { $Link = parent::inlineEmailTag($Excerpt); if (isset($Link)) { $Link['element']['attributes'] += ['data-link-text' => $Link['element']['text']]; } return $Link; } protected function inlineLink($Excerpt) { $Link = parent::inlineLink($Excerpt); if (isset($Link)) { $Link['element']['attributes'] += ['data-link-text' => $Link['element']['text']]; $url=&$Link['element']['attributes']['href']; if (strpos($url,':') === FALSE) { $url = $this->add_language_to_link_target($url); } $Link['extent'] = $Link['extent']; } return $Link; } protected function inlineUrl($Excerpt) { $Link = parent::inlineUrl($Excerpt); if (isset($Link)) { $Link['element']['attributes'] += ['data-link-text' => $Link['element']['text']]; } return $Link; } protected function inlineUrlTag($Excerpt) { $Link = parent::inlineUrlTag($Excerpt); if (isset($Link)) { $Link['element']['attributes'] += ['data-link-text' => $Link['element']['text']]; } return $Link; } }