function viewsphpfilter_views_tables_alter in Views PHP Filter 5
Implementation of hook_views_tables_alter() from Views API
File
- ./
viewsphpfilter.module, line 27
Code
function viewsphpfilter_views_tables_alter(&$table_data) {
if (isset($table_data['node']['filters'])) {
$table_data['node']['filters']['nid'] = array(
'name' => t('Node: Node ID'),
'operator' => 'views_handler_operator_or',
'cacheable' => 'no',
'handler' => 'views_handler_filter_nid',
'value' => array(
'#type' => 'textarea',
'#process' => array(
'views_filter_nid_process_form' => array(),
),
),
'option' => array(
'#type' => 'select',
'#options' => array(
'php' => 'PHP code',
'id' => 'ID list',
),
),
'help' => t('This filter allows nodes to be filtered by Node ID. PHP code should return an array with node IDs. ID lists should be separated by commas.'),
);
}
}