function publishcontent_views_tables_alter in Publish Content 5
Same name and namespace in other branches
- 5.2 publishcontent.module \publishcontent_views_tables_alter()
Implementation of hook_views_tables_alter(). implements a a link to un/publish for views
File
- ./
publishcontent.module, line 88 - Add button to publish or unpublish a node, with access control based on the node type
Code
function publishcontent_views_tables_alter(&$tables) {
$tables['node']['fields']['publish'] = array(
'name' => t('Node: Publish link'),
'handler' => array(
'publishcontent_views_handler_node_publish_destination' => t('Return To View'),
'publishcontent_views_handler_node_publish' => t('Return to Node'),
),
'notafield' => TRUE,
'addlfields' => array(
'type',
'uid',
'status',
),
'help' => t('Display a link to publish the node. Enter the text of this link into the option field; if blank the default "Publish" will be used.'),
);
}