function block_inject_get_offset in Block Inject 7
Checks to see if there is an offset for a particular node
Parameters
int $nid: The node ID of the node to check for
Returns the offset
3 calls to block_inject_get_offset()
- block_inject_do_injection in ./
block_inject.module - Helper function that prepares and calls the injection on a node.
- block_inject_exceptions_list in ./
block_inject.admin.inc - Callback for the Block Inject Exceptions page.
- block_inject_form_node_form_alter in ./
block_inject.module - Implements hook_form_FORM-ID_alter().
File
- ./
block_inject.module, line 773 - The Block Inject module functions.
Code
function block_inject_get_offset($nid) {
$result = db_select('block_inject_exceptions', 'bie')
->fields('bie', array(
'offset',
))
->condition('nid', $nid)
->isNotNull('offset')
->execute()
->fetchAssoc();
return $result;
}