processing continues. To abort the hook, a hook function must return an
explicit, boolean false or a string error message. Other falsey values are
tantamount to a 'return true' in earlier versions of MediaWiki.
+* BREAKING CHANGE: The EditSectionLink hook was removed after being
+ deprecated since MediaWiki 1.14. Use DoEditSectionLink instead.
== Compatibility ==
$title: title of page being edited
&$msg: localization message name, overridable. Default is 'editpage-tos-summary'
-'EditSectionLink': Do not use, use DoEditSectionLink instead.
-$skin: Skin rendering the UI
-$title: Title being linked to
-$section: Section to link to
-$link: Default link
-&$result: Result (alter this to override the generated links)
-$lang: The language code to use for the link in the wfMessage function
-
'EmailConfirmed': When checking that the user's email address is "confirmed".
$user: User being checked
$confirmed: Whether or not the email address is confirmed
array( 'noclasses', 'known' )
);
- # Run the old hook. This takes up half of the function . . . hopefully
- # we can rid of it someday.
- $attribs = '';
- if ( $tooltip ) {
- $attribs = wfMessage( 'editsectionhint' )->rawParams( $tooltip )
- ->inLanguage( $lang )->escaped();
- $attribs = " title=\"$attribs\"";
- }
- $result = null;
- wfRunHooks( 'EditSectionLink', array( &$this, $nt, $section, $attribs, $link, &$result, $lang ) );
- if ( !is_null( $result ) ) {
- # For reverse compatibility, add the brackets *after* the hook is
- # run, and even add them to hook-provided text. (This is the main
- # reason that the EditSectionLink hook is deprecated in favor of
- # DoEditSectionLink: it can't change the brackets or the span.)
- $result = wfMessage( 'editsection-brackets' )->rawParams( $result )
- ->inLanguage( $lang )->escaped();
- return "<span class=\"mw-editsection\">$result</span>";
- }
-
- # Add the brackets and the span, and *then* run the nice new hook, with
- # clean and non-redundant arguments.
+ # Add the brackets and the span and run the hook.
$result = wfMessage( 'editsection-brackets' )->rawParams( $link )
->inLanguage( $lang )->escaped();
$result = "<span class=\"mw-editsection\">$result</span>";