+function wfAddActionContentHook( &$content_actions ) {
+ global $wgRequest, $wgRequest, $wgTitle;
+
+ $action = $wgRequest->getText( 'action' );
+ if ( $wgTitle->getNamespace() == NS_IMAGE ) {
+
+ $editimage_page = SpecialPage::getTitleFor( 'EditImage');;
+
+ $content_actions['editimage'] = array(
+ 'class' => $action == 'editimage' ? 'selected' : false,
+ 'text' => "Crop Image", // the wfMsg was not working...
+ 'href' => $editimage_page->getLocalURL("image={$wgTitle->getPrefixedURL()}")
+ );
+ }
+
+ return true;
+}