#20592 closed enhancement (worksforme)
Add hooks to New Site form in Dashboard
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.4.3 |
Component: | Networks and Sites | Keywords: | bulk-reopened close |
Focuses: | multisite | Cc: |
Description
WordPress provides hooks for altering the wp-signup.php form that users use to create new sites on a MultiSite network. Using these, we developed a plugin that adds fields there for people to indicate some other information about their site. (specifically, to choose a topic)
However, there are no such hooks available on the New Site form available to network admins via the dashboard for some reason. This means that I am not able to append the extra form fields here that I can on the wp-signup.php page.
There should be similar (or identical) hooks used here so the New Site form can be modified in a similar way and be consistent with the wp-signup.php form.
Change History (13)
#7
@
11 years ago
- Milestone changed from Awaiting Review to Future Release
Agreed that hooks should be available in the new site form. I'd lean toward rethinking the experience of the new site form in general before we decide where to add the hooks. A patch as an example of where a hook could be useful may start things off as well.
#9
@
11 years ago
If/when this becomes a thing, we should revisit adding required field indicators to the form: #15765.
This ticket was mentioned in Slack in #core-multisite by richardtape. View the logs.
10 years ago
#14
@
6 years ago
- Keywords bulk-reopened close added; needs-patch removed
- Resolution set to worksforme
- Status changed from new to closed
- Version set to 4.4.3
There is an action hook since 4.5 just before the submit of the form, so you can easily add some custom HTML inputs.
<?php /** * Fires at the end of the new site form in network admin. * * @since 4.5.0 */ do_action( 'network_site_new_form' );
One of the tough parts here is that the html is completely different, so you would need to add different things in each place. It would be great to somehow get them working in a similar way.