From: David McCabe Date: Mon, 14 Jul 2008 22:29:53 +0000 (+0000) Subject: Added LinkerLinkAttributes hook. X-Git-Tag: 1.31.0-rc.0~46512 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=433fe522ec7b99651981a907bd007d993904290e;p=lhc%2Fweb%2Fwiklou.git Added LinkerLinkAttributes hook. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2217484cdd..72bb5beedc 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -186,6 +186,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN the database is potentially queried * (bug 9736) Redirects on Special:Fewestrevisions are now marked as such. * New date/time formats in Cs localization according to ČSN and PČP. +* Added new hook LinkerLinkAttributes for modifying attributes of tags. * HTML entities like   now work (are not escaped) in edit summaries. * (bug 13815) In the comment for page moves, use the colon-separator message instead of a hardcoded colon. diff --git a/docs/hooks.txt b/docs/hooks.txt index 2217a5ea58..64064b9f5f 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -753,6 +753,12 @@ $lang: laguage code (string) $specialPageAliases: associative array of magic words synonyms $lang: laguage code (string) +'LinkerLinkAttributes': At the end of Linker::getLinkAttributesInternal() just before the return +&$this: Linker object +$title: 'title' attribute string +$class: 'class' attribute string +&$result: Final attribute string + 'LinkerMakeExternalImage': At the end of Linker::makeExternalImage() just before the return &$url: the image url &$alt: the image's alt text diff --git a/includes/Linker.php b/includes/Linker.php index 6f502cf51c..864c145ff6 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -108,6 +108,7 @@ class Linker { $r .= " class=\"$class\""; } $r .= " title=\"$title\""; + wfRunHooks( 'LinkerLinkAttributes', array( &$this, $title, $class, &$r ) ); return $r; }