diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/menu.inc | 6 | ||||
-rw-r--r-- | includes/path.inc | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index b160dc094..b1d1bdb51 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -528,6 +528,12 @@ function menu_get_active_help() { * Returns an array of rendered menu items in the active breadcrumb trail. */ function menu_get_active_breadcrumb() { + + // No breadcrumb for the front page. + if (drupal_is_front_page()) { + return array(); + } + $links[] = l(t('Home'), '<front>'); $trail = _menu_get_active_trail(); diff --git a/includes/path.inc b/includes/path.inc index 0202c4820..665f05a3a 100644 --- a/includes/path.inc +++ b/includes/path.inc @@ -187,3 +187,15 @@ function drupal_set_title($title = NULL) { } return $stored_title; } + +/** + * Check if the current page is the front page. + * + * @return + * Boolean value: TRUE if the current page is the front page; FALSE if otherwise. + */ +function drupal_is_front_page() { + // As drupal_init_path updates $_GET['q'] with the 'site_frontpage' path, + // rely on $_REQUEST to verify the original value of 'q'. + return !isset($_REQUEST['q']); +} |