Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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;
}
}
Comment | File | Size | Author |
---|---|---|---|
#6 | garland_breadcrumb_documentation-1429176-3.patch | 495 bytes | Chi |
#4 | garland_breadcrumb_documentation-1429176-2.patch | 665 bytes | Chi |
#2 | quickfix_1429176-1.patch | 635 bytes | Chi |
#1 | quick_fix_1429176-0.patch | 572 bytes | Chi |
Comments
Comment #1
Chi CreditAttribution: Chi commentedComment #2
Chi CreditAttribution: Chi commentedreturn return :-)
Comment #3
jhodgdonYour 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)
Comment #4
Chi CreditAttribution: Chi commentedComment #5
Chi CreditAttribution: Chi commentedAs 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.
Comment #6
Chi CreditAttribution: Chi commentedgarland_breadcrumb() is rather a simple function. May be we needn't provide doxygen directives for it?
Comment #7
jhodgdonThat last patch is fine with me. Thanks for your attention to the standards!
Comment #8
webchickCommitted and pushed to 7.x. Thanks!