Add a filter to domain_exists() function
|Reported by:||jamescollins||Owned by:||ryan|
In Multisite, the domain_exists() function is used by WordPress to "check whether the specified blogname is already taken", however it doesn't provide any filter so that plugins can override the result.
Our Use Case:
On our multisite installs, we allow users to change their subdomain name (or domain name).
We keep a list of their previously used subdomains/domains, and if there is a HTTP request for one of their old domains, we automatically perform a 301 redirect to the new domain name.
However, we also want to make sure that other users cannot use any subdomain/domain name that has been used by another user.
Currently we have no way to override the return value of the domain_exists() function, which means we can't easily prevent other people from signing up for sites that use a domain/subdomain name
Add a simple filter to the end of the domain_exists() function. See attached patch.
Change History (13)
- Keywords reporter-feedback removed
- Milestone changed from Awaiting Review to 3.5
- Owner set to ryan
- Resolution set to fixed
- Status changed from new to closed