Added LinkerLinkAttributes hook.
authorDavid McCabe <david@users.mediawiki.org>
Mon, 14 Jul 2008 22:29:53 +0000 (22:29 +0000)
committerDavid McCabe <david@users.mediawiki.org>
Mon, 14 Jul 2008 22:29:53 +0000 (22:29 +0000)
RELEASE-NOTES
docs/hooks.txt
includes/Linker.php

index 2217484..72bb5be 100644 (file)
@@ -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 <a> tags.
 * HTML entities like &nbsp; 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.
index 2217a5e..64064b9 100644 (file)
@@ -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
index 6f502cf..864c145 100644 (file)
@@ -108,6 +108,7 @@ class Linker {
                        $r .= " class=\"$class\"";
                }
                $r .= " title=\"$title\"";
+               wfRunHooks( 'LinkerLinkAttributes', array( &$this, $title, $class, &$r ) );
                return $r;
        }