Annotation create

Allow you to override default behavior of annotation creation. Annotation example is comments. Default is true means allow creation.

<?php
function my_component_init(){
		ossn_add_hook('annotation', 'create', 'my_component_hook');
}
function my_component_hook($hook, $type, $return, $params){
		//$params['instance'] contain annotation object
		//You may use $params['instance']->type, $params['instance']->value 
		//to check if you want to allow annotation creation or not
		error_log(print_r($params, true));
		return true;
}
ossn_register_callback('ossn', 'init', 'my_component_init');

One usecase could be to check comment value if it is spam don't allow creation of it.