function dashboard_show_block_content in Drupal 7
Ajax callback: Displays the rendered contents of a specific block.
Parameters
$module: The block's module name.
$delta: The block's delta.
1 string reference to 'dashboard_show_block_content'
- dashboard_menu in modules/
dashboard/ dashboard.module - Implements hook_menu().
File
- modules/
dashboard/ dashboard.module, line 520 - Provides a dashboard page in the administrative interface.
Code
function dashboard_show_block_content($module, $delta) {
drupal_theme_initialize();
global $theme_key;
$blocks = array();
$block_object = db_query("SELECT * FROM {block} WHERE theme = :theme AND module = :module AND delta = :delta", array(
":theme" => $theme_key,
":module" => $module,
":delta" => $delta,
))
->fetchObject();
$block_object->enabled = $block_object->page_match = TRUE;
$blocks[$module . "_" . $delta] = $block_object;
$block_content = _block_render_blocks($blocks);
$build = _block_get_renderable_array($block_content);
$rendered_block = drupal_render($build);
print $rendered_block;
drupal_exit();
}