Manual:Hooks/ShortPagesQuery

From MediaWiki.org
Jump to navigation Jump to search
ShortPagesQuery
Available from version 1.27.0 (Gerrit change 262680)
Allow extensions to modify the query used by Special:ShortPages.
Define function:
public static function onShortPagesQuery( array &$tables, array &$conds, array &$joinConds, array &$options ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ShortPagesQuery": "MyExtensionHooks::onShortPagesQuery"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ShortPagesQuery'][] = 'MyExtensionHooks::onShortPagesQuery';
Called from:File(s): specials/SpecialShortpages.php
Function(s): getQueryInfo

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ShortPagesQuery extensions.

Details[edit]

  • &$tables: Array of tables to join in the query
  • &$conds: Array of conditions for the query
  • &$joinConds: Array of join conditions for the query
  • &$options: Array of options for the query