You are here

function front_page_url_outbound_alter in Front Page 7.2

Same name and namespace in other branches
  1. 6.2 front_page.module \front_page_url_outbound_alter()

Implements hook_page_url_outbound_alter().

This alters anything parsed through the url() function to replace the <front> string with an alternative string instead of the site_frontpage setting.

File

./front_page.module, line 261

Code

function front_page_url_outbound_alter(&$path, &$options, &$original_path) {

  // check if path is set to 'front_page' as this is our virtual home
  // page and doesn't work properly unless used from home page.
  if ($path == 'front_page') {
    $original_path = $path = '';
  }
  $newpath = variable_get('front_page_home_link_path', '');
  if (($path == '<front>' || empty($path)) && !empty($newpath)) {
    $original_path = $path = $newpath;
  }
}