Trigger upon comments `entity` menu is generated
~~~
<?php
function my_component_init(){
ossn_register_callback('comment', 'entityextra:menu', 'my_component_cb');
}
function my_component_cb($callback, $type, $params){
// $params['entity'] contains entity object.
ossn_register_menu_item('entityextra', array(
'name' => 'name of menu',
'class' => "comment-entity",
'href' => "javascript:void(0)",
'data-guid' => $params['entity']->guid,
'text' => 'Text',
));
}
ossn_register_callback('ossn', 'init', 'my_component_init');
~~~
Comment menu for entity type