You are here

function hook_hosting_automatic_aliases_alter in Hosting 7.3

Same name and namespace in other branches
  1. 7.4 alias/hosting_alias.api.php \hook_hosting_automatic_aliases_alter()

Alter the list of automatic aliases to create.

See also

hosting_alias_automatic_aliases().

1 function implements hook_hosting_automatic_aliases_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

hosting_alias_hosting_automatic_aliases_alter in alias/hosting_alias.module
Implements hook_hosting_automatic_aliases_alter().
1 invocation of hook_hosting_automatic_aliases_alter()
hosting_alias_automatic_aliases in alias/hosting_alias.module
Generate a default set of aliases for the site based on the global options.

File

alias/hosting_alias.api.php, line 27
Hooks provided by the hosting_alias module.

Code

function hook_hosting_automatic_aliases_alter(&$aliases, $context) {
  $alias_to_remove = 'web1.' . $context['url'];
  $key = array_search($alias_to_remove, $aliases);
  if ($key !== FALSE) {

    // Remove our unwanted alias.
    unset($aliases[$key]);
  }
}