You are here

function delta_blocks_get_content in Delta 7.3

Provides individual block content.

1 call to delta_blocks_get_content()
delta_blocks_block_view in delta_blocks/delta_blocks.module
Implements hook_block_view().

File

delta_blocks/delta_blocks.module, line 300
Exposes a number of core Drupal elements as blocks.

Code

function delta_blocks_get_content($delta) {
  $variables = array();
  switch ($delta) {
    case 'logo':
      $variables['logo'] = delta_blocks_logo();
      $variables['logo_linked'] = variable_get('delta_blocks_logo_linked', TRUE);
      $variables['site_name'] = filter_xss_admin(variable_get('site_name', 'Drupal'));
      return theme('delta_blocks_logo', $variables);
    case 'site-name':
      $variables['site_name'] = filter_xss_admin(variable_get('site_name'));
      $variables['site_name_linked'] = variable_get('delta_blocks_site_name_linked', TRUE);
      $variables['site_name_hidden'] = variable_get('delta_blocks_site_name_hidden', FALSE);
      return theme('delta_blocks_site_name', $variables);
    case 'site-slogan':
      $variables['site_slogan'] = filter_xss_admin(variable_get('site_slogan'));
      $variables['site_slogan_hidden'] = variable_get('delta_blocks_site_slogan_hidden', FALSE);
      return theme('delta_blocks_site_slogan', $variables);
    case 'branding':
      $variables['site_name'] = filter_xss_admin(variable_get('site_name', 'Drupal'));
      $variables['site_name_linked'] = variable_get('delta_blocks_branding_site_name_linked', TRUE);
      $variables['site_name_hidden'] = variable_get('delta_blocks_branding_site_name_hidden', FALSE);
      $variables['site_slogan'] = filter_xss_admin(variable_get('site_slogan', ''));
      $variables['site_slogan_hidden'] = variable_get('delta_blocks_branding_site_slogan_hidden', FALSE);
      $variables['logo'] = variable_get('delta_blocks_branding_logo_render', TRUE) ? delta_blocks_logo() : NULL;
      $variables['logo_linked'] = variable_get('delta_blocks_branding_logo_linked', TRUE);
      return theme('delta_blocks_branding', $variables);
    case 'page-title':
      $variables['page_title'] = drupal_get_title();
      $variables['page_title_hidden'] = variable_get('delta_blocks_page_title_hidden', FALSE);
      return theme('delta_blocks_page_title', $variables);
    case 'breadcrumb':
      $variables['breadcrumb_title_hidden'] = variable_get('delta_blocks_breadcrumb_title_hidden', TRUE);
      $variables['breadcrumb_current'] = variable_get('delta_blocks_breadcrumb_current', TRUE);
      $variables['breadcrumb'] = drupal_get_breadcrumb();
      return theme('delta_blocks_breadcrumb', $variables);
    case 'messages':
      return theme('status_messages');
    case 'tabs':
      $variables['primary'] = menu_primary_local_tasks();
      $variables['secondary'] = menu_secondary_local_tasks();
      return theme('delta_blocks_tabs', $variables);
    case 'action-links':
      $variables['action_links'] = menu_local_actions();
      return theme('delta_blocks_action_links', $variables);
    case 'feed-icons':
      $variables['feed_icons'] = drupal_get_feeds();
      return theme('delta_blocks_feed_icons', $variables);
  }
}