function aurora_preprocess_block

cis7 template.php aurora_preprocess_block(&$vars)
cle7 template.php aurora_preprocess_block(&$vars)
elmsmedia7 template.php aurora_preprocess_block(&$vars)
icor7 template.php aurora_preprocess_block(&$vars)
meedjum_blog7 template.php aurora_preprocess_block(&$vars)
mooc7 template.php aurora_preprocess_block(&$vars)

File

sites/all/themes/ulmus/aurora/template.php, line 322
Contains functions to alter Drupal's markup for the Aurora theme.

Code

function aurora_preprocess_block(&$vars) {
  // Logo Block
  if ($vars['block']->delta == 'blockify-logo') {
    $vars['theme_hook_suggestions'][] = 'block__logo';

    $site_name = filter_xss_admin(variable_get('site_name', 'Drupal'));

    // Strip the base_path from the beginning of the logo path.
    $path = preg_replace('|^' . base_path() . '|', '', theme_get_setting('logo'));

    $image = array(
      '#theme' => 'image',
      '#path' => $path,
      '#alt' => t('!site_name Logo', array(
        '!site_name' => $site_name,
      )),
    );

    $vars['logo'] = $image;
    $vars['sitename'] = $site_name;
  }
  // Site Name Block
  else if ($vars['block']->delta == 'blockify-site-name') {
    $vars['theme_hook_suggestions'][] = 'block__site_name';

    $site_name = filter_xss_admin(variable_get('site_name', 'Drupal'));

    $vars['sitename'] = $site_name;
  }
  // Site Slogan Block
  else if ($vars['block']->delta == 'blockify-site-slogan') {
    $vars['theme_hook_suggestions'][] = 'block__site_slogan';

    $slogan = filter_xss_admin(variable_get('site_slogan', 'Drupal'));

    $vars['slogan'] = $slogan;
  }
  // Page Title
  else if ($vars['block']->delta == 'blockify-page-title') {
    $vars['theme_hook_suggestions'][] = 'block__page_title';

    $vars['title'] = drupal_get_title();
  }
  else if ($vars['block']->delta == 'blockify-messages') {
    $vars['theme_hook_suggestions'][] = 'block__messages';
  }
  // Breadcrumbs
  else if ($vars['block']->delta == 'blockify-breadcrumb') {
    $vars['theme_hook_suggestions'][] = 'block__breadcrumbs';

    $breadcrumbs = drupal_get_breadcrumb();

    $vars['breadcrumbs'] = theme('breadcrumb', array('breadcrumb' => $breadcrumbs));
  }
  // Tabs
  else if ($vars['block']->delta == 'blockify-tabs') {
    $vars['theme_hook_suggestions'][] = 'block__tabs';

    $primary = menu_primary_local_tasks();
    $secondary = menu_secondary_local_tasks();

    $tabs = array(
      'primary' => $primary,
      'secondary' => $secondary,
    );

    $tabs = theme('menu_local_tasks', $tabs);

    $vars['tabs'] = $tabs;
  }
  // Actions
  else if ($vars['block']->delta == 'blockify-actions') {
    $vars['theme_hook_suggestions'][] = 'block__actions';

    $actions = menu_local_actions();
    $vars['actions'] = $actions;
  }
  // Feed Icons
  else if ($vars['block']->delta == 'blockify-feed-icons') {
    $vars['theme_hook_suggestions'][] = 'block__feed_icons';

    $icons = drupal_get_feeds();
    $vars['icons'] = $icons;
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.