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 commentedComment #2
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 commentedComment #5
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 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!