When create custom content type through UI or programmatically in Drupal 7, there is no link is listed in the Content > Add content.
I was creating the content types without any trouble, but now it is created(succes message is showing) when I check them in the node_type table but not lising in the admin/structure/types.
But no content type is listing(not any links showing) in the Content > Add content, or Structure > Content type administration menu.
Here is the code that allows users to access node pages:
/*
* Allow users to view the contents
*/
function mymodule_node_access_records($node){
$grants = array();
$grants[] = array(
'realm' => 'example_realm',
'gid' => 123,
'grant_view' => 1,
'grant_update' => 0,
'grant_delete' => 0,
'priority' => 0,
);
return $grants;
}
/**
* Implements hook_node_grants().
*/
function mymodule_node_grants($account, $op){
$grants = array();
if ($op == 'view') {
$grants['example_realm'] = array(
123,
);
}
return $grants;
}
Then I rebuild permissions using Content Access module.