WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#31928 new enhancement

Move wp-signup.php functions to a wp-includes directory

Reported by: joemcgill Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: has-patch
Focuses: multisite Cc:

Description

Right now, all of the functions that deal with multisite registration are located in the wp-signup.php file, mixed in with control and template logic. This makes it difficult to reuse any of the registration functionality and makes it harder to create a custom registration experience for a network.

I'd propose moving all of the functional logic into a file in the wp-includes folder and include that file at the the beginning of the registration page, at minimum. Additionally, we could big and make wp-signup.php a dummy file and put everything into the wp-includes folder, as @markjaquith suggests in #31744. Even so, I think the functional logic should be separated out from the rest.

Attachments (1)

31928.diff (83.5 KB) - added by imath 3 years ago.

Download all attachments as: .zip

Change History (4)

#1 @oceandigital
4 years ago

"makes it harder to create a custom registration experience for a network"

Im all in favour of a fix that will cure this issue. There needs to be an ability for each sub site to have a custom registration process.

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


4 years ago

#3 @imath
3 years ago

  • Keywords has-patch added

Hi,

in 31928.diff, i've moved all wp-signup.php functions to wp-includes/ms-functions.php and wp-includes/ms-template.php. I also did the same with wp-activate.php.
I've created a new wp-includes/theme-compat/signup.php template to allow theme designers to use their own template and have this default one in case they don't.
I've also put the css rules into a css file: wp-includes/css/wp-signup.css.

Both files wp-signup.php and wp-activate.php are sharing this css file and the template.

I apologise if my function names are a bit exotic, i've try to do my best as i'm not so good at english.

Last edited 3 years ago by imath (previous) (diff)

@imath
3 years ago

Note: See TracTickets for help on using tickets.