This function does not accept the breadcrumb parameter.

/**
 * Return a themed breadcrumb trail.
 *
 * @param $breadcrumb
 *   An array containing the breadcrumb links.
 * @return a string containing the breadcrumb output.
 */
function garland_breadcrumb($variables) {
  $breadcrumb = $variables['breadcrumb'];

  if (!empty($breadcrumb)) {
    // Provide a navigational heading to give context for breadcrumb links to
    // screen-reader users. Make the heading invisible with .element-invisible.
    $output = '<h2 class="element-invisible">' . t('You are here') . '</h2>';

    $output .= '<div class="breadcrumb">' . implode(' › ', $breadcrumb) . '</div>';
    return $output;
  }
}
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Chi’s picture

Status: Active » Needs review
FileSize
572 bytes
Chi’s picture

FileSize
635 bytes

return return :-)

jhodgdon’s picture

Status: Needs review » Needs work

Your patch looks like the right documentation -- thanks for reporting and fixing this!

A couple of things need fixing though. When we patch documentation, we try to bring it up to our standards. See:
http://drupal.org/node/1354#functions (general standards -- especially the first line verb standards and the blank line between @param and @return)
http://drupal.org/node/1354#themeable (specific standards for the first line for themeable functions)

Chi’s picture

Status: Needs work » Needs review
FileSize
665 bytes
  1. Added the blank line between @param and @return.
  2. Added @ingroup themeable directive
Chi’s picture

As stated in documentation we should add a @return directive when theme function returns some other type of formatted output other than HTML. Perhaps the patch from #1 is correct.

Chi’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
495 bytes

garland_breadcrumb() is rather a simple function. May be we needn't provide doxygen directives for it?

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

That last patch is fine with me. Thanks for your attention to the standards!

webchick’s picture

Status: Needs review » Fixed

Committed and pushed to 7.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.