message key to use in the name column,
$context: IContextSource object
+'SpecialTrackingCategories::preprocess': Called after LinkBatch on Special:TrackingCategories
+$specialPage: The SpecialTrackingCategories object
+$trackingCategories: Array of data from Special:TrackingCategories with msg and cats
+
+'SpecialTrackingCategories::generateCatLink': Called for each cat link on Special:TrackingCategories
+$specialPage: The SpecialTrackingCategories object
+$catTitle: The Title object of the linked category
+&$html: The Result html
+
'SpecialUploadComplete': Called after successfully uploading a file from
Special:Upload.
&$form: The SpecialUpload object
}
$batch->execute();
+ Hooks::run( 'SpecialTrackingCategories::preprocess', [ $this, $trackingCategories ] );
+
foreach ( $trackingCategories as $catMsg => $data ) {
$allMsgs = [];
$catDesc = $catMsg . '-desc';
);
foreach ( $data['cats'] as $catTitle ) {
- $catTitleText = Linker::link(
+ $html = Linker::link(
$catTitle,
htmlspecialchars( $catTitle->getText() )
);
- $allMsgs[] = $catTitleText;
+
+ Hooks::run( 'SpecialTrackingCategories::generateCatLink',
+ [ $this, $catTitle, &$html ] );
+
+ $allMsgs[] = $html;
}
# Extra message, when no category was found