Available from version 1.16.0
Occurs before anything is initialized in MediaWiki::performRequestForTitle().

Define function:
public static function onBeforeInitialize( &$title, &$article, &$output, &$user, $request, $mediaWiki ) { ... }

Attach hook:
$wgHooks['BeforeInitialize'][] = 'MyExtensionHooks::onBeforeInitialize';
Called from: Wiki.php

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

Details Edit

  • &$title: Title being used for request
  • &$article: The associated Article object
  • &$output: OutputPage object
  • &$user: User object
  • $request: WebRequest object
  • $mediaWiki: MediaWiki object

See also Edit