Lines Matching refs:link

826      * @param string $link The link name
832 public function camelcaselink($link, $returnonly = false) argument
835 return $this->internallink($link, $link, null, true);
837 $this->internallink($link, $link);
909 $link = [];
916 $link['rel'] = 'nofollow';
927 $link['target'] = $conf['target']['wiki'];
928 $link['style'] = '';
929 $link['pre'] = '';
930 $link['suf'] = '';
931 $link['more'] = 'data-wiki-id="' . $id . '"'; // id is already cleaned
932 $link['class'] = $class;
936 $link['url'] = wl($id, $params);
937 $link['name'] = $name;
938 $link['title'] = $id;
941 ($conf['userewrite']) ? $link['url'] .= '?' : $link['url'] .= '&';
944 $link['url'] .= 's[]=' . implode('&s[]=', $search);
946 $link['url'] .= 's=' . rawurlencode($search);
951 if ($hash) $link['url'] .= '#' . $hash;
955 return $this->_formatLink($link);
957 $this->doc .= $this->_formatLink($link);
999 $link = [];
1000 $link['target'] = $conf['target']['extern'];
1001 $link['style'] = '';
1002 $link['pre'] = '';
1003 $link['suf'] = '';
1004 $link['more'] = '';
1005 $link['class'] = $class;
1006 $link['url'] = $url;
1007 $link['rel'] = '';
1009 $link['name'] = $name;
1010 $link['title'] = $this->_xmlEntities($url);
1011 if ($conf['relnofollow']) $link['rel'] .= ' ugc nofollow';
1012 if ($conf['target']['extern']) $link['rel'] .= ' noopener';
1016 return $this->_formatLink($link);
1018 $this->doc .= $this->_formatLink($link);
1038 $link = [];
1039 $link['target'] = $conf['target']['interwiki'];
1040 $link['pre'] = '';
1041 $link['suf'] = '';
1042 $link['more'] = '';
1043 $link['name'] = $this->_getLinkTitle($name, $wikiUri, $isImage);
1044 $link['rel'] = '';
1052 $link['class'] = "interwiki iw_$class";
1054 $link['class'] = 'media';
1059 $link['target'] = $conf['target']['wiki'];
1063 $link['class'] .= ' wikilink1';
1065 $link['class'] .= ' wikilink2';
1066 $link['rel'] .= ' nofollow';
1069 if ($conf['target']['interwiki']) $link['rel'] .= ' noopener';
1071 $link['url'] = $url;
1072 $link['title'] = $this->_xmlEntities($link['url']);
1076 if ($url == '') return $link['name'];
1077 return $this->_formatLink($link);
1079 $this->doc .= $link['name'];
1080 } else $this->doc .= $this->_formatLink($link);
1096 $link = [];
1097 $link['target'] = $conf['target']['windows'];
1098 $link['pre'] = '';
1099 $link['suf'] = '';
1100 $link['style'] = '';
1102 $link['name'] = $this->_getLinkTitle($name, $url, $isImage);
1104 $link['class'] = 'windows';
1106 $link['class'] = 'media';
1109 $link['title'] = $this->_xmlEntities($url);
1112 $link['url'] = $url;
1116 return $this->_formatLink($link);
1118 $this->doc .= $this->_formatLink($link);
1135 $link = [];
1136 $link['target'] = '';
1137 $link['pre'] = '';
1138 $link['suf'] = '';
1139 $link['style'] = '';
1140 $link['more'] = '';
1144 $link['class'] = 'mail';
1146 $link['class'] = 'media';
1158 $link['url'] = 'mailto:' . $href;
1159 $link['name'] = $name;
1160 $link['title'] = $title;
1164 return $this->_formatLink($link);
1166 $this->doc .= $this->_formatLink($link);
1202 $link = $this->_getMediaLinkConf($src, $title, $align, $width, $height, $cache, $render);
1206 $link['url'] = ml(
1221 $link['class'] .= ' mediafile mf_' . $class;
1222 $link['url'] = ml(
1231 if ($exists) $link['title'] .= ' (' . filesize_h(filesize(mediaFN($src))) . ')';
1234 if (!empty($hash)) $link['url'] .= '#' . $hash;
1238 $link['class'] .= ' wikilink2';
1244 return $link['name'];
1246 return $this->_formatLink($link);
1249 $this->doc .= $link['name'];
1251 $this->doc .= $this->_formatLink($link);
1294 $link = $this->_getMediaLinkConf($src, $title, $align, $width, $height, $cache, $render);
1296 $link['url'] = ml($src, ['cache' => $cache]);
1308 $link['class'] .= ' mediafile mf_' . $class;
1311 if ($hash) $link['url'] .= '#' . $hash;
1315 if ($linking == 'nolink' || $noLink) return $link['name'];
1316 else return $this->_formatLink($link);
1318 $this->doc .= $link['name'];
1319 } else $this->doc .= $this->_formatLink($link);
1620 * @param array $link attributes of a link
1625 public function _formatLink($link) argument
1628 if (!str_starts_with($link['url'], 'mailto:')) {
1629 $link['url'] = str_replace('&', '&', $link['url']);
1630 $link['url'] = str_replace('&', '&', $link['url']);
1633 $link['title'] = str_replace('&', '&', $link['title']);
1637 $link['url'] = strtr($link['url'], ['>' => '%3E', '<' => '%3C', '"' => '%22']);
1638 $link['title'] = strtr($link['title'], ['>' => '&gt;', '<' => '&lt;', '"' => '&quot;']);
1641 $ret .= $link['pre'];
1642 $ret .= '<a href="' . $link['url'] . '"';
1643 if (!empty($link['class'])) $ret .= ' class="' . $link['class'] . '"';
1644 if (!empty($link['target'])) $ret .= ' target="' . $link['target'] . '"';
1645 if (!empty($link['title'])) $ret .= ' title="' . $link['title'] . '"';
1646 if (!empty($link['style'])) $ret .= ' style="' . $link['style'] . '"';
1647 if (!empty($link['rel'])) $ret .= ' rel="' . trim($link['rel']) . '"';
1648 if (!empty($link['more'])) $ret .= ' ' . $link['more'];
1650 $ret .= $link['name'];
1652 $ret .= $link['suf'];
1880 $link = [];
1881 $link['class'] = 'media';
1882 $link['style'] = '';
1883 $link['pre'] = '';
1884 $link['suf'] = '';
1885 $link['more'] = '';
1886 $link['target'] = $conf['target']['media'];
1887 if ($conf['target']['media']) $link['rel'] = 'noopener';
1888 $link['title'] = $this->_xmlEntities($src);
1889 $link['name'] = $this->_media($src, $title, $align, $width, $height, $cache, $render);
1891 return $link;