| 39 | | $output .= " » <a href='" . $h->url(array(), 'admin') . "'>"; |
| 40 | | $output .= $h->lang['admin_theme_main_admin_cp'] . "</a>\n"; |
| 41 | | } else { |
| 42 | | $output .= "<a href='" . SITEURL . "'>" . $h->lang['main_theme_breadcrumbs_home'] . "</a>\n"; |
| | 39 | $crumbs = $h->pluginHook('breadcrumbs'); |
| | 40 | if ($crumbs) { |
| | 41 | return $output.' » '.array_pop($crumbs); |
| | 42 | } |
| | 43 | return $output." » ".$h->pageTitle; |
| | 44 | } |
| | 45 | |
| | 46 | /** |
| | 47 | * Prepares the RSS breadcrumbs link |
| | 48 | * |
| | 49 | * @param Hotaru $h |
| | 50 | * @param string $status post status, e.g. new, top, etc. |
| | 51 | * @param array $vars key -> value pairs |
| | 52 | * @return string |
| | 53 | */ |
| | 54 | public function rssBreadcrumbsLink(Hotaru $h, $status = '', $vars = array()) |
| | 55 | { |
| | 56 | $url_array = array('page' => 'rss'); |
| | 57 | |
| | 58 | if ($status) { |
| | 59 | $url_array['status'] = $status; |
| 45 | | |
| 46 | | |
| 47 | | // plugin hook: |
| 48 | | $crumbs = $h->pluginHook('breadcrumbs'); |
| 49 | | if ($crumbs) { |
| 50 | | $crumbs = array_reverse($crumbs); // so the last one gets used. |
| 51 | | foreach ($crumbs as $key => $value) { |
| 52 | | $output .= " » " . $value; |
| 53 | | return $output; // we only want the first result so return now. |
| 54 | | } |
| 55 | | } |
| 56 | | |
| 57 | | // in case of no plugins: |
| 58 | | $output .= " » " . $h->pageTitle; |
| 59 | | return $output; |
| 60 | | } |
| 61 | | |
| 62 | | |
| 63 | | /** |
| 64 | | * prepares the RSS breadcrumbs link |
| 65 | | * |
| 66 | | * @param string $status - post status, e.g. new, top, etc. |
| 67 | | * @param array $vars - array of key -> value pairs |
| 68 | | * @return string |
| 69 | | */ |
| 70 | | public function rssBreadcrumbsLink($h, $status = '', $vars) |
| 71 | | { |
| 72 | | if ($status) { |
| 73 | | $url_array = array('page'=>'rss', 'status'=>$status); |
| 74 | | } else { |
| 75 | | $url_array = array('page'=>'rss'); // defaults to all |
| 76 | | } |
| 77 | | |