function drupal_is_front_page

7.x path.inc drupal_is_front_page()
6.x path.inc drupal_is_front_page()

Check if the current page is the front page.

Return value

Boolean value: TRUE if the current page is the front page; FALSE if otherwise.

9 calls to drupal_is_front_page()
blogapi_init in drupal-6.x/modules/blogapi/blogapi.module
l in drupal-6.x/includes/common.inc
Formats an internal or external URL link as an HTML anchor tag.
locale_block in drupal-6.x/modules/locale/locale.module
Implementation of hook_block(). Displays a language switcher. Translation links may be provided by other modules.
menu_get_active_breadcrumb in drupal-6.x/includes/menu.inc
Get the breadcrumb for the current page, as determined by the active trail.
menu_set_active_trail in drupal-6.x/includes/menu.inc
Sets or gets the active trail (path to root menu root) of the current page.

... See full list

File

drupal-6.x/includes/path.inc, line 221
Functions to handle paths in Drupal, including path aliasing.

Code

function drupal_is_front_page() {
  static $is_front_page;

  if (!isset($is_front_page)) {
    // As drupal_init_path updates $_GET['q'] with the 'site_frontpage' path,
    // we can check it against the 'site_frontpage' variable.
    $is_front_page = ($_GET['q'] == drupal_get_normal_path(variable_get('site_frontpage', 'node')));
  }

  return $is_front_page;
}