Opened 3 years ago

Last modified 2 years ago

#15389 new enhancement

Make New Site & New User Network form pluggable.

Reported by: ptahdunbar Owned by:
Priority: normal Milestone: Future Release
Component: Network Admin Version: 3.1
Severity: normal Keywords: has-patch
Cc: trac@…

Description

Problem: Currently the only way to add additional fields to the new site & new user network form is by dynamically injecting them using javascript.

Solution: They should either have action hooks or use the settings API. I'll provide patches for both methods.

In addition, I've added semantic ids to the current form fields so they can be selectively hidden.

Attachments (1)

ticket.15389.network-forms-hooks.diff (2.7 KB) - added by ptahdunbar 3 years ago.
This patch uses the hooks approach

Download all attachments as: .zip

Change History (5)

  • Cc trac@… added

Axing the settings api approach as that'll involve moving all the form processing to a new network/post.php file for just these two forms.

Alternatively, we could just have this within the forms:

do_settings_fields( 'wpms_new_site', 'default' );

Then:

add_settings_field( 'twitter-id', 'Twitter username', 'wpms_twitter_callback', 'wpmu_new_site', 'default' );

Which works, but that's only using half of the settings API as it won't make use of register_setting() (you'd have to handle form processing on your own).

This patch uses the hooks approach

  • Type changed from defect (bug) to enhancement
  • Milestone changed from Awaiting Review to Future Release
Note: See TracTickets for help on using tickets.