Opened 5 years ago
Last modified 5 years ago
#49968 new enhancement
Network Site Info - No hooks for customzsation
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.5 |
Component: | Networks and Sites | Keywords: | has-patch |
Focuses: | administration, multisite | Cc: |
Description
Currently, there are no hooks to enable developers to add fields to the site info table.
I propose to add hooks after each field to enable developers to add fields as required. Furthermore, a hook to enable the saving of the fields also.
do_action( 'update_site_info', $id );
will run immediately after the default fields are saved and before the restoring of current blog and subsequent redirect occurs.
do_action( 'network_site_info_after_address_field', $id, $details );
do_action( 'network_site_info_after_registered_field', $id, $details );
do_action( 'network_site_info_after_last_updated_field', $id, $details );
do_action( 'network_site_info_after_attributes_field', $id, $details );
Will all run immediately after the respective default fields.
Change History (3)
This ticket was mentioned in PR #231 on WordPress/wordpress-develop by mikeyhoward1977.
5 years ago
#1
This ticket was mentioned in Slack in #core by mikehoward. View the logs.
5 years ago
Note: See
TracTickets for help on using
tickets.
https://core.trac.wordpress.org/ticket/49968#ticket
Currently, there are no hooks to enable developers to add fields to the site info table.
I propose to add hooks after each field to enable developers to add fields as required. Furthermore, a hook to enable the saving of the fields also.
do_action( 'update_site_info', $id );
will run immediately after the default fields are saved and before the restoring of current blog and subsequent redirect occurs.do_action( 'network_site_info_after_address_field', $id, $details );
do_action( 'network_site_info_after_registered_field', $id, $details );
do_action( 'network_site_info_after_last_updated_field', $id, $details );
do_action( 'network_site_info_after_attributes_field', $id, $details );
Will all run immediately after the respective default fields.
<!--
Hi there! Thanks for contributing to WordPress!
Pull Requests in this GitHub repository must be linked to a ticket in the WordPress Core Trac instance (https://core.trac.wordpress.org), and are only used for code review. No pull requests will be merged on GitHub.
See the WordPress Handbook page on using PRs for Code Review more information: https://make.wordpress.org/core/handbook/contribute/git/github-pull-requests-for-code-review/
If this is your first time contributing, you may also find reviewing these guides first to be helpful:
-->
Trac ticket: