WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 2 months ago

#18777 new enhancement

Add new site valid domain filter

Reported by: TJNowell Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: has-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 3 years ago.
Patch for site-new.php

Download all attachments as: .zip

Change History (4)

TJNowell3 years ago

Patch for site-new.php

comment:2 TJNowell3 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

comment:3 nacin2 months ago

  • Component changed from Network Admin to Networks and Sites
  • Focuses administration added
Note: See TracTickets for help on using tickets.