function _custom_pagers_visibility in Custom Pagers 6
Same name and namespace in other branches
- 5 custom_pagers.module \_custom_pagers_visibility()
 - 7 custom_pagers.module \_custom_pagers_visibility()
 
2 calls to _custom_pagers_visibility()
- custom_pagers_block in ./
custom_pagers.module  - Implementation of hook_block().
 - custom_pagers_nodeapi in ./
custom_pagers.module  
File
- ./
custom_pagers.module, line 171  - Allows administrators to define context-sensitive previous/next pagers for any node type.
 
Code
function _custom_pagers_visibility($pager, $node) {
  $visible = FALSE;
  if (!empty($pager->visibility_php)) {
    // Use PHP code to generate the list.
    ob_start();
    $result = eval(trim($pager->visibility_php));
    $visible = $result == TRUE;
    ob_end_clean();
  }
  elseif (!empty($pager->node_type)) {
    $visible = strpos($pager->node_type, $node->type) !== FALSE;
  }
  return $visible;
}