Manual:Hooks/SkinTemplateContentActions

From Linux Web Expert

SkinTemplateContentActions
<translate> Available from <tvar name=1><translate> version <tvar (r10411, codereview)</tvar></translate>
<translate> Removed in <tvar name=1><translate> version <tvar </tvar></translate>

<translate> Define function:</translate>
public static function onSkinTemplateContentActions( &$content_actions ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"SkinTemplateContentActions": "MediaWiki\\Extension\\MyExtension\\Hooks::onSkinTemplateContentActions"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> SkinTemplate.php
<translate> Interface:</translate> SkinTemplateContentActionsHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:SkinTemplateContentActions extensions</tvar>.</translate>


Note: MediaWiki 1.18 now uses the Vector-style hook for all skins, please see Universal for the Vector and 1.18 equivalent of this hook.

Details

Called after building the $content_action array right before returning it, see content_action.php in the extension module for a demonstration of how to use this hook.

  • Tip: Always return true, otherwise other extensions that have hooked this event will not function properly!

Arguments

  • $content_actions: The array of content actions