Opened 6 months ago
Last modified 5 months ago
#62086 new enhancement
Add Filter for Custom Form Attributes in New Site Creation (/wp-admin/network/site-new.php)
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Networks and Sites | Keywords: | has-patch |
Focuses: | administration, multisite | Cc: |
Description
When adding a new site in a WordPress Multisite Network (via /wp-admin/network/site-new.php
), the form does not provide a filter to allow the addition of custom attributes, such as enctype="multipart/form-data"
, which is necessary for handling file uploads during new site creation.
This issue arises when developers need to extend the new site creation form to allow file uploads (e.g., custom site logos or configuration files). However, since there is no hook or filter to modify the form attributes, it is currently impossible to add the enctype="multipart/form-data"
attribute to the form without overriding core files.
Change History (3)
This ticket was mentioned in PR #7402 on WordPress/wordpress-develop by @sakibmoon.
6 months ago
#1
This ticket was mentioned in PR #7403 on WordPress/wordpress-develop by @sakibmoon.
6 months ago
#2
This change introduces the network_site_new_form_attributes
filter to the site creation form (/wp-admin/network/site-new.php
) in WordPress Multisite.
The filter allows developers to modify form attributes such as enctype="multipart/form-data"
, enabling file uploads or other custom behaviors when creating a new site.
This enhancement provides more flexibility for developers extending the multisite functionality without requiring modifications to core files.
Trac ticket: https://core.trac.wordpress.org/ticket/62086
This change introduces the
network_site_new_form_attributes
filter to the site creation form (/wp-admin/network/site-new.php
) in WordPress Multisite.The filter allows developers to modify form attributes such as
enctype="multipart/form-data"
, enabling file uploads or other custom behaviors when creating a new site.This enhancement provides more flexibility for developers extending the multisite functionality without requiring modifications to core files.
Trac ticket: https://core.trac.wordpress.org/ticket/62086