You are here

function nodeblock_type_enabled in Nodeblock 6

Same name and namespace in other branches
  1. 5 nodeblock.module \nodeblock_type_enabled()
  2. 7 nodeblock.module \nodeblock_type_enabled()

Utility function to tell whether a type is enabled as a node block

4 calls to nodeblock_type_enabled()
nodeblock_block in ./nodeblock.module
Implementation of hook_block().
nodeblock_form_alter in ./nodeblock.module
Implementation of hook_form_alter().
nodeblock_link in ./nodeblock.module
Implementation of hook_link().
nodeblock_nodeapi in ./nodeblock.module
Implementation of hook_nodeapi().

File

./nodeblock.module, line 11
Enables use of specified node types as custom blocks.

Code

function nodeblock_type_enabled($type) {
  if (is_object($type)) {
    $type = $type->type;
  }
  return variable_get('nodeblock_' . $type, 0) ? TRUE : FALSE;
}