Manual:Hooks/SpecialNewpagesConditions

SpecialNewpagesConditions
Available from version 1.17.0
Called when building the SQL query for Special:NewPages.
Define function:
public static function onSpecialNewpagesConditions( NewPagesPager &$pager, FormOptions $opts, array &$conds, array &$tables, array &$fields, array &$joinConds ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"SpecialNewpagesConditions": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialNewpagesConditions"
	}
}
Called from: File(s): specials/pagers/NewPagesPager.php
Function(s): getQueryInfo
Interface: SpecialNewpagesConditionsHook.php

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


Details

edit
  • &$pager: NewPagesPager object (subclass of ReverseChronologicalPager)
  • $opts: FormOptions object containing special page options
  • &$conds: array of WHERE conditionals for query
  • &$tables: array of tables to be queried
  • &$fields: array of columns to select
  • &$joinConds: JOIN conditions for the tables