diff --git a/ds.module b/ds.module
index 0ef0f47..b5370a0 100644
--- a/ds.module
+++ b/ds.module
@@ -940,75 +940,38 @@ function ds_render_ctools_field($field) {
  * Render a block field.
  */
 function ds_render_block_field($field) {
-  $contextual = module_exists('contextual') && user_access('access contextual links');
-  list($module, $delta) = explode('|', $field['properties']['block']);
-  $block = module_invoke($module, 'block_view', $delta);
-  $contextual_links = array();
-  // Get contextual links.
-  if ($contextual) {
-    if (isset($block['content']) && is_array($block['content']) && isset($block['content']['#contextual_links'])) {
-      $contextual_links = $block['content']['#contextual_links'];
-    }
-  }
-  if (isset($block['content']) && is_array($block['content'])) {
-    $block['content'] = drupal_render($block['content']);
-  }
-  if (!empty($block['content'])) {
+  global $theme;
 
-    global $theme_key;
-    $block_title = db_query("SELECT title FROM {block} WHERE module = :module AND delta = :delta AND theme = :theme", array(':module' => $module, ':delta' => $delta, ':theme' => $theme_key))->fetchField();
-    if (!empty($block_title)) {
-      $block['subject'] = $block_title == '<none>' ? '' : check_plain($block_title);
-    }
-
-    // i18n support.
-    if (function_exists('i18n_block_block_view_alter')) {
-      // Check language visibility.
-      global $language;
-      static $block_languages = FALSE;
-      if (!$block_languages) {
-        $block_languages = array();
-        $result = db_query('SELECT module, delta, language FROM {i18n_block_language}');
-        foreach ($result as $record) {
-          $block_languages[$record->module][$record->delta][$record->language] = TRUE;
-        }
-      }
-      if (isset($block_languages[$module][$delta]) && !isset($block_languages[$module][$delta][$language->language])) {
-        return;
-      }
+  // The the block definition and invoke the hook.
+  list($module, $delta) = explode('|', $field['properties']['block']);
+  $block = db_query("SELECT * FROM {block} WHERE module = :module AND delta = :delta AND theme = :theme", array(':module' => $module, ':delta' => $delta, ':theme' => $theme))->fetchObject();
+  $array = module_invoke($block->module, 'block_view', $block->delta);
 
-      // Translate.
-      $i18n_block = db_query("SELECT * FROM {block} WHERE module = :module AND delta = :delta", array(':module' => $module, ':delta' => $delta))->fetchObject();
-      if (!empty($i18n_block->i18n_mode)) {
-        i18n_block_block_view_alter($block, $i18n_block);
-        // OH WTF ...
-        if (!empty($i18n_block->title)) {
-          $block['subject'] = $i18n_block->title;
-        }
-      }
-    }
+  // Allow modules to modify the block before it is viewed, via either
+  // hook_block_view_alter() or hook_block_view_MODULE_DELTA_alter().
+  drupal_alter(array('block_view', "block_view_{$block->module}_{$block->delta}"), $array, $block);
 
-    $block = (object) $block;
+  if (!empty($array)) {
+    $block->subject = !empty($array['title']) ? $array['title'] : '';
     switch ($field['properties']['block_render']) {
       case DS_BLOCK_TEMPLATE:
-        if (!isset($block->subject)) {
-          $block->subject = NULL;
-        }
-        $block->region = NULL;
-        $block->module = $module;
-        $block->delta = $delta;
-        $elements = array('elements' => array('#block' => $block, '#children' => $block->content));
-        // Add contextual links
-        if ($contextual) {
-          $elements['elements'] += array('#contextual_links' => array_merge($contextual_links, array('block' => array('admin/structure/block/manage', array($block->module, $block->delta)))));
+        // Create build array.
+        $elements = array('elements' => array(
+          '#block' => $block,
+          '#subject' => $array['subject'],
+          '#children' => $array['content'])
+        );
+        // Add contextual links.
+        if (module_exists('contextual') && user_access('access contextual links')) {
+          $elements['elements']['#contextual_links']['block'] = array('admin/structure/block/manage', array($block->module, $block->delta));
         }
         return theme('block', $elements);
         break;
       case DS_BLOCK_TITLE_CONTENT:
-        return '<h2 class="block-title">' . $block->subject . '</h2>' . $block->content;
+        return '<h2 class="block-title">' . $array['title'] . '</h2>' . $array['content'];
         break;
       case DS_BLOCK_CONTENT:
-        return $block->content;
+        return $array['content'];
         break;
     }
   }
