* (T37247) Output from Parser::parse() will now be wrapped in a div with
class="mw-parser-output" by default. This may be changed or disabled using
ParserOptions::setWrapOutputClass().
+* Added 'ChangeTagsAllowedAdd' hook, enabling extensions to allow software-
+ specific tags to be added by users.
=== External library changes in 1.30 ===
$rc: RecentChange being tagged when the tagging accompanies the action or null
$user: User who performed the tagging when the tagging is subsequent to the action or null
+'ChangeTagsAllowedAdd': Called when checking if a user can add tags to a change.
+&$allowedTags: List of all the tags the user is allowed to add. Any tags the
+ user wants to add ($addTags) that are not in this array will cause it to fail.
+ You may add or remove tags to this array as required.
+$addTags: List of tags user intends to add.
+$user: User who is adding the tags.
+
'ChangeUserGroups': Called before user groups are changed.
$performer: The User who will perform the change
$user: The User whose groups will be changed
}
// to be applied, a tag has to be explicitly defined
- // @todo Allow extensions to define tags that can be applied by users...
$allowedTags = self::listExplicitlyDefinedTags();
+ Hooks::run( 'ChangeTagsAllowedAdd', [ &$allowedTags, $tags, $user ] );
$disallowedTags = array_diff( $tags, $allowedTags );
if ( $disallowedTags ) {
return self::restrictedTagError( 'tags-apply-not-allowed-one',