Make WordPress Core

Changeset 60398


Ignore:
Timestamp:
06/30/2025 07:00:07 PM (7 months ago)
Author:
johnjamesjacoby
Message:

Networks and Sites: Add support for file/upload type inputs on the "New Site" screen.

This change allows plugins to add files when creating sites via the network-admin "New Site" form.

  • Adds enctype="multipart/form-data" to the form in wp-admin/network/site-new.php.
  • Supports input type="file" fields in this form (via the network_site_new_form action).

Props johnjamesjacoby, sakibmoon, sirlouen, realloc.

Fixes #62086.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/site-new.php

    r59784 r60398  
    205205?>
    206206<p><?php echo wp_required_field_message(); ?></p>
    207 <form method="post" action="<?php echo esc_url( network_admin_url( 'site-new.php?action=add-site' ) ); ?>" novalidate="novalidate">
     207<form method="post" enctype="multipart/form-data" action="<?php echo esc_url( network_admin_url( 'site-new.php?action=add-site' ) ); ?>" novalidate="novalidate">
    208208<?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ); ?>
    209209    <table class="form-table" role="presentation">
Note: See TracChangeset for help on using the changeset viewer.