Make WordPress Core

Opened 10 years ago

Last modified 14 months ago

#18777 new enhancement

Support filtering of domain validation on Add New Site.

Reported by: TJNowell Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: needs-patch
Focuses: multisite, administration Cc:


I've a client who wanted to add subdirectory sites in a multisite install e.g.:



etc. But to do this, they had to add the site without the slash, then go back, and edit the sites URL.

So to allow support for this, ( coupled with the obligatory custom sunrise.php ) and to allow error checking ( e.g. not allowing depoortment1, and only allowing a preset number of subfolders ), I added a filter.

You'll find attached a small patch to site-new.php adding this filter

Attachments (1)

filterpatch.diff (732 bytes) - added by TJNowell 10 years ago.
Patch for site-new.php

Download all attachments as: .zip

Change History (12)

10 years ago

Patch for site-new.php

#2 @TJNowell
10 years ago

Indeed, that particular ticket is related to my use case, but there are other uses for the filter ( beyond the subdirectory use ), e.g. enforcing naming conventions

#3 @nacin
8 years ago

  • Component changed from Network Admin to Networks and Sites
  • Focuses administration added

#4 @jeremyfelt
6 years ago

#32928 was marked as a duplicate.

#5 follow-up: @lordspace
6 years ago

any update on this ?

This ticket was mentioned in Slack in #core-multisite by sam. View the logs.

6 years ago

#7 in reply to: ↑ 5 @jeremyfelt
6 years ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from Awaiting Review to Future Release

Replying to lordspace:

any update on this ?

No progress yet, but domain and path validation (and filtering) is something I definitely want to work on in the near future. See also #17397 for ideas here.

I want to avoid immediately adding a filter so that we don't put ourselves in a hole. I do think it's something we can get to soon though.

#8 @orbisius
6 years ago

Thanks for the update Jeremy.

#9 @DrewAPicture
6 years ago

#32928 was marked as a duplicate.

This ticket was mentioned in Slack in #core-multisite by jeremyfelt. View the logs.

5 years ago

#11 @brookedot
14 months ago

  • Summary changed from Add new site valid domain filter to Support filtering of domain validation on Add New Site.
Note: See TracTickets for help on using tickets.