Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/196711
Change subject: Update documentation for SpecialPage_initList
......................................................................
Update documentation for SpecialPage_initList
State that it can be used to conditionally register special pages
Change-Id: I83fd793c9cbb7a70fe97186f72078ee021a79475
---
M docs/hooks.txt
M includes/specialpage/SpecialPageFactory.php
2 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/11/196711/1
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 62285df..05a3ae1 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -2639,7 +2639,7 @@
(message key) and a 'default' value.
'SpecialPage_initList': Called when setting up SpecialPageFactory::$list, use
this
-hook to remove a core special page.
+hook to remove a core special page or conditionally register special pages.
$list: list (array) of core special pages
'SpecialPageAfterExecute': Called after SpecialPage::execute.
diff --git a/includes/specialpage/SpecialPageFactory.php
b/includes/specialpage/SpecialPageFactory.php
index 175b0cb..c262519 100644
--- a/includes/specialpage/SpecialPageFactory.php
+++ b/includes/specialpage/SpecialPageFactory.php
@@ -249,8 +249,8 @@
// Add extension special pages
self::$list = array_merge( self::$list, $wgSpecialPages
);
- // Run hooks
- // This hook can be used to remove undesired built-in
special pages
+ // This hook can be used to disable unwanted core
special pages
+ // or conditionally register special pages.
Hooks::run( 'SpecialPage_initList', array( &self::$list
) );
}
--
To view, visit https://gerrit.wikimedia.org/r/196711
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I83fd793c9cbb7a70fe97186f72078ee021a79475
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits