You are here

function _disable_breadcrumbs_node_query in Disable breadcrumbs 7

Same name and namespace in other branches
  1. 6 disable_breadcrumbs.module \_disable_breadcrumbs_node_query()

Gets disable_breadcrumb status of current node.

2 calls to _disable_breadcrumbs_node_query()
disable_breadcrumbs_node_form_submit in ./disable_breadcrumbs.module
Submit handler to deal with
disable_breadcrumbs_node_load in ./disable_breadcrumbs.module
Implements hook_node_load().

File

./disable_breadcrumbs.module, line 98
Disable breadcrumbs

Code

function _disable_breadcrumbs_node_query($nid) {

  //Returns '1' currently (from disable_breadcrumb field), kept in for more flexibility in the future.
  return db_select('disable_breadcrumbs', 'db')
    ->fields('db', array(
    'disable_breadcrumb',
  ))
    ->condition('db.nid', $nid)
    ->addTag('node_access')
    ->execute()
    ->fetchField();
}