Add $context to the ArticleFromTitle hook
[lhc/web/wiklou.git] / docs / hooks.txt
index bbe1680..4a43359 100644 (file)
@@ -269,6 +269,9 @@ $reason: the reason for the move (added in 1.13)
 'AbortNewAccount': Return false to cancel explicit account creation.
 $user: the User object about to be created (read-only, incomplete)
 &$msg: out parameter: HTML to display on abort
+&$status: out parameter: Status object to return, replaces the older $msg param (added in 1.23)
+          Create the object with Status::newFatal() to ensure proper API error messages
+          are returned when creating account through API clients.
 
 'AbortTalkPageEmailNotification': Return false to cancel talk page email notification
 $targetUser: the user whom to send talk page email notification
@@ -295,6 +298,15 @@ $article: Article object
 $user: the User object that was created. (Parameter added in 1.7)
 $byEmail: true when account was created "by email" (added in 1.12)
 
+'AddNewAccountApiForm': Allow modifying internal login form when creating an account via API.
+$apiModule: the ApiCreateAccount module calling
+$loginForm: the LoginForm used
+
+'AddNewAccountApiResult': Modify API output when creating a new account via API.
+$apiModule: the ApiCreateAccount module calling
+$loginForm: the LoginForm used
+&$result: associative array for API result data
+
 'AfterFinalPageOutput': At the end of OutputPage::output() but before final
 ob_end_flush() which will send the buffered output to the client. This allows
 for last-minute modification of the output within the buffer by using
@@ -529,6 +541,7 @@ $wikiPage: WikiPage (object) being modified
 Wiki::articleFromTitle().
 $title: Title (object) used to create the article object
 $article: Article (object) that will be returned
+$context: IContextSource (object)
 
 'ArticleInsertComplete': After a new article is created. DEPRECATED, use
 PageContentInsertComplete.
@@ -763,6 +776,7 @@ $block: Block object (which is set to be autoblocking)
 'BlockIp': Before an IP address or user is blocked.
 $block: the Block object about to be saved
 $user: the user _doing_ the block (not the one being blocked)
+&$reason: if the hook is aborted, the error message to be returned in an array
 
 'BlockIpComplete': After an IP address or user is blocked.
 $block: the Block object that was saved