function block_fusion_apply_preprocess_hook_callback in Fusion Accelerator 7
Same name and namespace in other branches
- 7.2 fusion_apply/modules/block.fusion.inc \block_fusion_apply_preprocess_hook_callback()
Fusion Apply preprocess hook callback.
Parameters
&$form: Passes in the $form parameter from hook_form_alter().
$form_state: Passes in the $form_state parameter from hook_form_alter().
Return value
An array of preprocess hooks we wish to use.
Related topics
1 string reference to 'block_fusion_apply_preprocess_hook_callback'
- block_fusion_apply_config_info in fusion_apply/
modules/ block.fusion.inc - Implements hook_fusion_apply_config_info().
File
- fusion_apply/
modules/ block.fusion.inc, line 43 - Provide skins handling for block.module
Code
function block_fusion_apply_preprocess_hook_callback(&$form, $form_state) {
$preprocess_hooks = array();
if (empty($form['module']['#value']) && !empty($form['fusion_apply']['element']['#value'])) {
list($module, $delta) = explode('__', $form['fusion_apply']['element']['#value'], 2);
$result = db_select('block', 'b')
->fields('b')
->distinct()
->condition('b.module', $module)
->condition('b.delta', $delta)
->range(0, 1)
->execute();
foreach ($result as $block) {
$preprocess_hooks[] = 'block_' . $block->module;
}
}
else {
$preprocess_hooks[] = 'block_' . $form['module']['#value'];
}
$preprocess_hooks[] = 'block';
return $preprocess_hooks;
}