Extension:AbuseFilter/Hooks/AbuseFilter-contentToString

AbuseFilter-contentToString
Available from version 1.21.0 (Gerrit change 42268)
Called when converting a Content object to a string to which filters can be applied. If the hook function returns true, Content::getTextForSearchIndex() will be used for non-text content.
Define function:
public static function onAbuseFilter_contentToString( $content, &$text ) { ... }
Attach hook:
$wgHooks['AbuseFilter-contentToString'][] = 'MyExtensionHooks::onAbuseFilter_contentToString';
Called from:File(s): AbuseFilter / includes/AbuseFilter.php
Function(s): contentToString

For more information about attaching hooks, see Manual:Hooks .
For examples of other extensions using this hook, see Category:AbuseFilter-contentToString extensions.

DetailsEdit

  • $content: The Content object
  • &$text: Set this to the desired text.