diff options
Diffstat (limited to 'engine/lib/sites.php')
-rw-r--r-- | engine/lib/sites.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engine/lib/sites.php b/engine/lib/sites.php index 0878bb66b..441a649ad 100644 --- a/engine/lib/sites.php +++ b/engine/lib/sites.php @@ -544,6 +544,21 @@ return false; } + /** + * Retrieve a site and return the domain portion of its url. + * + * @param int $guid + */ + function get_site_domain($guid) + { + $guid = (int)$guid; + + $site = get_entity($site); + if ($site instanceof ElggSite) + return parse_url($site->url, 'host'); + + return false; + } /**
* Initialise site handling
|