function adaptivetheme_preprocess_breadcrumb

cis7 preprocess.inc adaptivetheme_preprocess_breadcrumb(&$vars)
cle7 preprocess.inc adaptivetheme_preprocess_breadcrumb(&$vars)
elmsmedia7 preprocess.inc adaptivetheme_preprocess_breadcrumb(&$vars)
icor7 preprocess.inc adaptivetheme_preprocess_breadcrumb(&$vars)
meedjum_blog7 preprocess.inc adaptivetheme_preprocess_breadcrumb(&$vars)
mooc7 preprocess.inc adaptivetheme_preprocess_breadcrumb(&$vars)

Preprocess variables for breadcrumbs

File

sites/all/themes/ulmus/adaptivetheme/at_core/inc/preprocess.inc, line 1022
All Preprocess functions for templates and theme fucntions. If you need to add or modify preprocess functions do it in your sub-theme.

Code

function adaptivetheme_preprocess_breadcrumb(&$vars) {
  // Add Google rich snippets to breadcrumbs using RDFa
  if (module_exists('rdf')) {
    $snippet_url = ' rel="v:url" ';
    $snippet_title = ' property="v:title" ';
    foreach ($vars['breadcrumb'] as $key => $breadcrumb) {
      preg_match_all('/<([\w]+)[^>]*>.*?<\/\\1>/', $breadcrumb, $matches);
      if (count($matches[0]) > 0) {
        $snippet = $snippet_title;
        if ($matches[1][count($matches[1]) - 1] == 'a') {
          $snippet = $snippet_url . $snippet_title;
        }
        $breadcrumb = substr_replace($breadcrumb, $snippet, strlen($matches[1][count($matches[1]) - 1]) + 1, 0);
      }
      else {
        $breadcrumb = '<span ' . $snippet_title . '>' . $breadcrumb . '</span>';
      }
      $vars['breadcrumb'][$key] = '<span typeof="v:Breadcrumb">' . $breadcrumb . '</span>';
    }
  }
}