function block_refresh_block_content in Block Refresh 6
Same name and namespace in other branches
- 5 block_refresh.module \block_refresh_block_content()
- 7.2 block_refresh.module \block_refresh_block_content()
- 7 block_refresh.module \block_refresh_block_content()
page callback for /block_refresh/[module]/[delta] displays the block content, without any other page information
1 string reference to 'block_refresh_block_content'
- block_refresh_menu in ./
block_refresh.module - Implemention of hook_menu()
File
- ./
block_refresh.module, line 211
Code
function block_refresh_block_content($block = NULL, $delta = NULL) {
if (!isset($block) || !isset($delta) || $block != 'block_refresh' && !module_hook($block, 'block')) {
drupal_not_found();
}
if ($block == 'block_refresh' && $delta == 'all') {
$query = isset($_GET['blocks']) ? $_GET['blocks'] : '';
$pairs = explode(',', $query);
foreach ($pairs as $pair) {
list($module, $delta) = explode('|', $pair);
$block = module_invoke($module, 'block', 'view', $delta);
$output .= '<div id="block-refresh-data-' . $module . '-' . $delta . '">' . $block['content'] . '</div>';
}
if ($output) {
print '<div id="block-refresh-data-all" class="block-refresh-hidden">' . $output . '</div>';
}
exit;
}
$settings = variable_get('block_refresh_settings', array());
if (!$settings['block-' . $block . '-' . $delta]['enabled'] && !$settings['block-' . $block . '-' . $delta]['manual']) {
drupal_not_found();
}
$block = module_invoke($block, 'block', 'view', $delta);
print $block['content'];
exit;
}