[wp-trac] [WordPress Trac] #21142: Add a filter to domain_exists() function
WordPress Trac
wp-trac at lists.automattic.com
Tue Jul 3 00:32:49 UTC 2012
#21142: Add a filter to domain_exists() function
--------------------------+-----------------------------
Reporter: jamescollins | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Multisite | Version:
Severity: normal | Keywords: has-patch
--------------------------+-----------------------------
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
'''Suggestion:'''
Add a simple filter to the end of the domain_exists() function. See
attached patch.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21142>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list