function drush_sitealias_add_to_alias_path

8.0.x drush_sitealias_add_to_alias_path($add_path)
6.x drush_sitealias_add_to_alias_path($add_path)
7.x drush_sitealias_add_to_alias_path($add_path)
3.x drush_sitealias_add_to_alias_path($add_path)
4.x drush_sitealias_add_to_alias_path($add_path)
5.x drush_sitealias_add_to_alias_path($add_path)
master drush_sitealias_add_to_alias_path($add_path)

Add a path to the array of paths where alias files are searched for.


$add_path: A path to add to the search path (or NULL to not add any). Once added, the new path will remain available until drush exits.

Return value

An array of paths containing all values added so far

4 calls to drush_sitealias_add_to_alias_path()
drush_sitealias_alias_path in includes/
Return the array of paths where alias files are searched for.
_drush_find_local_sites_in_sites_folder in includes/
Return a list of all of the local sites at the specified 'sites' folder.
_drush_sitealias_cache_alias in includes/
Add an empty record for the specified alias name
_drush_sitealias_get_record in includes/


includes/, line 229
The site alias API.


function drush_sitealias_add_to_alias_path($add_path) {
  static $site_paths = array();

  if ($add_path != NULL) {
    if (!is_array($add_path)) {
      $add_path = explode(':', $add_path);
    $site_paths = array_unique(array_merge($site_paths, $add_path));
  return $site_paths;