WordPress.org

Make WordPress Core

Opened 9 years ago

Last modified 10 months ago

#18777 new enhancement

Add new site valid domain filter

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

Description

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

example.com/department1/johnjoe

example.com/department2/fredbloggs

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 9 years ago.
Patch for site-new.php

Download all attachments as: .zip

Change History (11)

@TJNowell
9 years ago

Patch for site-new.php

#2 @TJNowell
9 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
6 years ago

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

#4 @jeremyfelt
5 years ago

#32928 was marked as a duplicate.

#5 follow-up: @lordspace
5 years ago

any update on this ?

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


5 years ago

#7 in reply to: ↑ 5 @jeremyfelt
5 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
5 years ago

Thanks for the update Jeremy.

#9 @DrewAPicture
5 years ago

#32928 was marked as a duplicate.

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


4 years ago

Note: See TracTickets for help on using tickets.