< Extension:AbuseFilter < Hooks
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.
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.

If the hook function returns true, Content::getTextForSearchIndex() will be used for non-text content.

Parameters

  • $content: The Content object
  • &$text: Set this to the desired text.
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.