You are here

function custom_url_rewrite_outbound in Trailing Slash 7

Implements custom_url_rewrite_outbound().

This is for Drupal 6.x support and any Drupal 7.x modules that may use it (eg. GlobalRedirect).

File

./trailing_slash.module, line 134
Adds checkbox to the Clean URLs settings form and alters outbound URLs.

Code

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

  // If Clean URLs and Trailing Slashes are enabled and not external, front
  // page, or empty path, add a trailing slash.
  if (!empty($GLOBALS['conf']['clean_url']) && variable_get('trailing_slash', TRUE) && !$options['external'] && $path != '<front>' && !empty($path)) {
    trailing_slash_add($path);
  }
}