r37669 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37668‎ | r37669 | r37670 >
Date:22:29, 14 July 2008
Author:david
Status:old
Tags:
Comment:
Added LinkerLinkAttributes hook.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -753,6 +753,12 @@
754754 $specialPageAliases: associative array of magic words synonyms
755755 $lang: laguage code (string)
756756
 757+'LinkerLinkAttributes': At the end of Linker::getLinkAttributesInternal() just before the return
 758+&$this: Linker object
 759+$title: 'title' attribute string
 760+$class: 'class' attribute string
 761+&$result: Final attribute string
 762+
757763 'LinkerMakeExternalImage': At the end of Linker::makeExternalImage() just before the return
758764 &$url: the image url
759765 &$alt: the image's alt text
Index: trunk/phase3/includes/Linker.php
@@ -108,6 +108,7 @@
109109 $r .= " class=\"$class\"";
110110 }
111111 $r .= " title=\"$title\"";
 112+ wfRunHooks( 'LinkerLinkAttributes', array( &$this, $title, $class, &$r ) );
112113 return $r;
113114 }
114115
Index: trunk/phase3/RELEASE-NOTES
@@ -186,6 +186,7 @@
187187 the database is potentially queried
188188 * (bug 9736) Redirects on Special:Fewestrevisions are now marked as such.
189189 * New date/time formats in Cs localization according to ČSN and PČP.
 190+* Added new hook LinkerLinkAttributes for modifying attributes of <a> tags.
190191 * HTML entities like &nbsp; now work (are not escaped) in edit summaries.
191192 * (bug 13815) In the comment for page moves, use the colon-separator message
192193 instead of a hardcoded colon.

Follow-up revisions

RevisionCommit summaryAuthorDate
r37715Revert r37669: LinkerLinkAttributes hook doesn't seem to make a lot of sense....brion21:16, 15 July 2008

Status & tagging log