Manual:Hooks/UnknownAction

Details
Actions for a page are passed to MediaWiki via the action parameter in the URL. For example, to edit the page 'Foo' the action 'edit' would be appended to the main article URL, giving.

This hook allows you to add custom actions to MediaWiki. If an action is requested that the software doesn't handle natively, this hook will be called.

Returning false will allow processing to continue, but it will not output any content for the page. You will need to use  and similar functions to create the appropriate page content for this action, and   to set the title for display at the top of the page.

Returning true will cause the standard 'no such action' message that you get when entering &action=nonexistant_action.

Arguments

 * $action: action name
 * $article: article "acted on" - this is an article object, not the article name.