Opened 14 years ago
Closed 9 years ago
#15389 closed enhancement (fixed)
Make New Site & New User Network form pluggable.
Reported by: | ptahdunbar | Owned by: | jeremyfelt |
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Networks and Sites | Keywords: | has-patch |
Focuses: | multisite, administration | Cc: |
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 (2)
Change History (12)
#2
@
14 years ago
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).
#5
@
11 years ago
- Component changed from Network Admin to Networks and Sites
- Focuses administration added
#6
@
11 years ago
- Keywords needs-patch dev-feedback added; has-patch removed
- Milestone changed from Future Release to 3.9
Having a hook on both these pages would be great. In the standard user-new.php
, we fire user_new_form
after the closing table tag. It may be worth having some consistency, though per [25631] via #18709, this is a different form. Firing that outside the table would allow for more flexible output by plugins.
We should consider hitting this in 3.9 if possible.
#7
@
11 years ago
- Milestone changed from 3.9 to Future Release
Going to push this to another release so that we can make sure we do it the right way. Ideally, this would be refactored quite a bit to make any extension easier. As it is, any new action added to the form would need a matching action to handle it on save to avoid even more hacky implementations.
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.