I have created one menu tab in the node page to show statistics of the article using my custom module.
I have implemented hook_menu() as follows:
function mymodule_menu() {
$items = array();
$items['node/%node/menu_title'] = array(
'title' => 'Page Title',
'page callback' => 'get_statstics',
'page arguments' => array(1),
'access callback' => TRUE,
'type' => MENU_LOCAL_TASK,
);
return $items;
}
It is working fine. But I wanted only author of the node to have access to this link and also for specific content type. Now it is showing this link to every node and for every user.
How can I restrict it to specific content type and for author only?
-- Many thanks for your time