#50704 closed enhancement (fixed)
network_site_info_form action missing in site-info.php
Reported by: | virgodesign | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.6 | Priority: | normal |
Severity: | normal | Version: | 5.4 |
Component: | Networks and Sites | Keywords: | good-first-bug has-patch has-dev-note |
Focuses: | administration, multisite | Cc: |
Description
Hi,
in the network administration, wordpress 4.5 introduced a new action in site-new.php
that let users perform custom actions within the "new site creation" form.
The action is the following
/** * Fires at the end of the new site form in network admin. * * @since 4.5.0 */ do_action( 'network_site_new_form' );
One possible action to perform is, for example, add custom meta field to the new registered site.
As of wp 5.1
the support for site metadata as taken a big step further with the new db table wp_blogmeta
.
In the site-info.php network admin screen there is no chance to display any custom fields created using for example the network_site_new_form
previously introduced, nor any type of site metadata created by a super admin.
The missin key in this flow is an action that let users display/add custom fields in the site-info.php
network admin screen.
I would like to propose to add the following action hook in site-info.php
just before the submit_button()
function:
/** * Fires at the end of the site info form in network admin. * * @since 5.5.1 * * @param int $id The site ID. */ do_action( 'network_site_info_form', $id );
Attachments (1)
Change History (10)
#1
@
4 years ago
- Keywords needs-patch good-first-bug added
- Milestone changed from Awaiting Review to 5.6
#2
@
4 years ago
- Keywords has-patch added; needs-patch removed
Hi @SergeyBiryukov,
Thanks, I've submitted a patch for this ticket.
Hi there, welcome to WordPress Trac! Thanks for the ticket.
The suggestion makes sense and seems like a useful addition. Would you be interested in creating a patch?