Page MenuHomePhabricator

Update extension hook registration example in hooks.txt
Closed, ResolvedPublic

Description

Currently, docs/hooks.txt in mediawiki core includes

The setup function for the extension just has to add its hook functions to the
appropriate events:
	setupTitleReversingExtension() {
		global $wgHooks;
		$wgHooks['ArticleShow'][] = 'reverseArticleTitle';
		$wgHooks['ArticleDelete'][] = 'reverseArticleTitle';
		$wgHooks['ArticleExport'][] = 'reverseForExport';
	}

this method of hook registration is no longer used, and the example should be updated. I'll do this in a few days if there are no objections.

Event Timeline

Restricted Application added a project: User-DannyS712. · View Herald TranscriptAug 13 2019, 9:18 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
DannyS712 triaged this task as Low priority.Aug 13 2019, 9:18 AM
DannyS712 moved this task from Unsorted to Next on the User-DannyS712 board.

Change 530798 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Update documentation in hooks.txt

https://gerrit.wikimedia.org/r/530798

Change 530798 merged by jenkins-bot:
[mediawiki/core@master] hooks.txt: Convert docs to modern extension registration style

https://gerrit.wikimedia.org/r/530798

DannyS712 closed this task as Resolved.Aug 21 2019, 2:30 AM