function ddblock_get_ddblock_enabled_module_blocks in Dynamic display block 7
Same name and namespace in other branches
- 6 ddblock.module \ddblock_get_ddblock_enabled_module_blocks()
Get the blocks which are enabled in the settings page of the dynamic display block module.
1 call to ddblock_get_ddblock_enabled_module_blocks()
- ddblock_form_alter in ./
ddblock.module - Implements hook_form_alter().
File
- ./
ddblock.module, line 2652 - Enables your site to display dynamic content in a block.
Code
function ddblock_get_ddblock_enabled_module_blocks() {
// get the saved block types which can be used as ddblock instances.
$block_types = variable_get('ddblock_blocks', array());
// put the block types in an array.
$blocks = array();
$i = 0;
foreach ($block_types as $value) {
if ($value) {
//$option[0] contains module name, $option[1] contains delta, $option[2] contains block title.
$option = explode(':', $value);
$blocks[$i]['module'] = $option[0];
$blocks[$i]['delta'] = $option[1];
$i++;
}
}
return $blocks;
}