mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-24 11:53:45 +03:00

* Allow image uploads * Add the logo as "generated" meta This will be attached after we've processed the `$_FILES` object into an upload. * Load image into media library, attach to the submitted pledge as a featured image. * Move where image handling happens so we can pass back errors * Pass back error if upload fails * Create a validation function to do basic checking of form data * Move logo uploading to a separate function, and rely on core checks for mime & filesize checking * Tweak function name to be more clear * Remove bmp, tiff, and ico file types
26 lines
630 B
PHP
26 lines
630 B
PHP
<?php
|
|
namespace WordPressDotOrg\FiveForTheFuture\View;
|
|
|
|
use function WordPressDotOrg\FiveForTheFuture\get_views_path;
|
|
|
|
/** @var array $messages */
|
|
/** @var bool $updated */
|
|
?>
|
|
|
|
<form class="pledge-form" id="5ftf-form-pledge-manage" action="" method="post" enctype="multipart/form-data">
|
|
<?php
|
|
require get_views_path() . 'inputs-pledge-org-info.php';
|
|
require get_views_path() . 'manage-contributors.php';
|
|
require get_views_path() . 'inputs-pledge-org-email.php';
|
|
?>
|
|
|
|
<div>
|
|
<input
|
|
type="submit"
|
|
id="5ftf-pledge-submit"
|
|
name="action"
|
|
value="<?php esc_attr_e( 'Update Pledge', 'wporg' ); ?>"
|
|
/>
|
|
</div>
|
|
</form>
|