Manage Pledge: Enable Manage Form functionality

* Fix issue with fetching data in `get_pledge_meta` when no submission has been POST'd
* Rename to `subset`, since `context` is also used elsewhere
* Show form content when there are form errors
* Fix warnings on new pledge form
* Skip wpautop before save, so editors don’t need to edit HTML unless they want to
This commit is contained in:
Kelly Dwan 2019-11-21 16:42:59 -05:00
parent b898dc23f3
commit 60b5ca5d2a
4 changed files with 165 additions and 72 deletions

View file

@ -1,8 +1,13 @@
<?php
namespace WordPressDotOrg\FiveForTheFuture\View;
/** @var array $data */
/** @var bool $readonly */
/**
* @var array $data
* @var int $pledge_id
* @var bool $readonly
*/
?>
<div class="form-field">
@ -20,6 +25,11 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
</div>
<?php if ( ! is_admin() ) : ?>
<?php if ( has_post_thumbnail( $pledge_id ) ) : ?>
<div class="form-field form-field__logo-display">
<?php echo get_the_post_thumbnail( $pledge_id, 'pledge-logo' ); ?>
</div>
<?php endif; ?>
<div class="form-field form-field__logo">
<label for="5ftf-org-logo">
<?php esc_html_e( 'Logo', 'wporg-5ftf' ); ?>