five-for-the-future/plugins/wporg-5ftf/views/inputs-pledge-contributors.php

38 lines
939 B
PHP
Raw Normal View History

<?php
2019-11-12 18:02:14 +02:00
namespace WordPressDotOrg\FiveForTheFuture\View;
2019-11-12 18:02:14 +02:00
/**
* @var array $data
* @var bool $readonly
* @var string $action
*/
$updating = in_array( $action, array( 'manage_pledge', 'Update Pledge' ) );
$required = $updating ? '' : 'required';
$label = $updating
? __( 'Add New Contributors', 'wordpressorg' )
: __( 'Contributor Usernames', 'wordpressorg' )
;
?>
<div class="form-field">
<label for="5ftf-pledge-contributors">
2019-11-12 18:02:14 +02:00
<?php echo esc_html( $label ); ?>
</label>
<input
type="text"
id="5ftf-pledge-contributors"
name="pledge-contributors"
placeholder="sanguine.zoe206, captain-mal, kayleefixesyou"
value="<?php echo esc_attr( $data['pledge-contributors'] ); ?>"
2019-11-12 18:02:14 +02:00
<?php echo esc_attr( $required ); ?>
aria-describedby="5ftf-pledge-contributors-help"
/>
<p id="5ftf-pledge-contributors-help">
<?php esc_html_e( 'Separate each WordPress.org username with a comma.', 'wordpressorg' ); ?>
</p>
</div>