@@ -1,17 +1,25 @@
|
||||
<?php
|
||||
namespace MediaWiki\Extension\AnatImageViewer;
|
||||
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use RequestContext;
|
||||
use Html;
|
||||
use ParserOutput;
|
||||
|
||||
class AnnotationHooks {
|
||||
public static function registrationCallback() {
|
||||
// Must match the name used in the 'ContentHandlers' section of extension.json
|
||||
define( 'CONTENT_MODEL_ANNOTATION', 'annotation' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the content handler for annotations
|
||||
*
|
||||
* @param Title $title
|
||||
* @param string &$model
|
||||
* @return void
|
||||
*/
|
||||
public static function onContentHandlerDefaultModelFor( $title, &$model ) {
|
||||
if ( $title->getNamespace() === NS_AV_ANNOT ) {
|
||||
self::console_log('Found fucking thing!',true);
|
||||
$model = CONTENT_MODEL_ANNOTATION;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Small helper function to display information on the browser console
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user