$user: User object representing user contributions are being fetched for
$sp: SpecialPage instance, providing context
+'SpecialContributions::getForm::filters': Called with a list of filters to render
+on Special:Contributions.
+$sp: SpecialContributions object, for context
+&$filters: List of filters rendered as HTML
+
'SpecialListusersDefaultQuery': Called right before the end of
UsersPager::getDefaultQuery().
$pager: The UsersPager instance
)
);
+ $filters = array();
+
if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {
- $deletedOnlyCheck = Html::rawElement(
+ $filters[] = Html::rawElement(
'span',
array( 'class' => 'mw-input-with-label' ),
Xml::checkLabel(
array( 'class' => 'mw-input' )
)
);
- } else {
- $deletedOnlyCheck = '';
}
- $checkLabelTopOnly = Html::rawElement(
+ $filters[] = Html::rawElement(
'span',
array( 'class' => 'mw-input-with-label' ),
Xml::checkLabel(
array( 'class' => 'mw-input' )
)
);
- $checkLabelNewOnly = Html::rawElement(
+ $filters[] = Html::rawElement(
'span',
array( 'class' => 'mw-input-with-label' ),
Xml::checkLabel(
array( 'class' => 'mw-input' )
)
);
+
+ Hooks::run(
+ 'SpecialContributions::getForm::filters',
+ array( $this, &$filters )
+ );
+
$extraOptions = Html::rawElement(
'td',
array( 'colspan' => 2 ),
- $deletedOnlyCheck . $checkLabelTopOnly . $checkLabelNewOnly
+ implode( '', $filters )
);
$dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ),