2019-10-25 22:07:09 +03:00
< ? php
namespace WordPressDotOrg\FiveForTheFuture\View ;
2019-10-30 01:37:14 +02:00
use WP_Post ;
2019-10-25 22:07:09 +03:00
/**
2019-10-30 01:37:14 +02:00
* @ var string $directory_url
2019-11-26 22:37:19 +02:00
* @ var bool $email_confirmed
* @ var bool $is_new_pledge
2019-10-30 01:37:14 +02:00
* @ var int $pledge_id
* @ var WP_Post | null $pledge
2019-10-25 22:07:09 +03:00
*/
?>
2024-09-02 19:09:08 +03:00
< div style = " height:0; " aria - hidden = " true " class = " wp-block-spacer " ></ div >
2019-10-25 22:07:09 +03:00
< ? php if ( true === $email_confirmed ) : ?>
< div class = " notice notice-success notice-alt " >
< p >
2019-10-30 01:37:14 +02:00
< ? php
2019-11-26 22:37:19 +02:00
if ( $is_new_pledge ) {
printf (
wp_kses_post ( __ ( 'Thank you for confirming your address! We’ ve emailed confirmation links to the contributors you mentioned, and your pledge will show up in <a href=\"%s\">the directory</a> once one contributor confirms their participation.' , 'wporg-5ftf' ) ),
esc_url ( $directory_url )
);
} else {
printf (
wp_kses_post ( __ ( 'Thank you for confirming your address! If you have confirmed contributors, your pledge is visible in <a href=\"%s\">the directory</a> again. Otherwise, your pledge wiill show up once one contributor confirms their participation.' , 'wporg-5ftf' ) ),
esc_url ( $directory_url )
);
}
2019-10-30 01:37:14 +02:00
?>
</ p >
< ? php if ( $pledge instanceof WP_Post ) : ?>
< p >
< ? php echo wp_kses_post ( sprintf (
2019-11-23 20:24:37 +02:00
__ ( 'In the meantime, your pledge will be visible here: %s' , 'wporg-5ftf' ),
2019-10-30 01:37:14 +02:00
sprintf (
'<a href="%1$s">%1$s</a>' ,
esc_url ( get_permalink ( $pledge ) )
)
) ); ?>
</ p >
< ? php endif ; ?>
< p >
2019-11-23 20:24:37 +02:00
< ? php esc_html_e ( 'Thanks again for pledging your organization’ s resources to contribute to WordPress! We can do great things together!' , 'wporg-5ftf' ); ?>
2019-10-25 22:07:09 +03:00
</ p >
</ div >
< ? php else : ?>
< div class = " notice notice-error notice-alt " >
< p >
< ? php
2019-11-14 20:48:17 +02:00
// There could be other reasons it failed, like an invalid token, but this is the most common reason,
// and the only one that normal users should experience, so we're assuming it in order to provide
// the best UX.
2024-09-02 19:09:08 +03:00
esc_html_e ( 'Your confirmation link has expired, please obtain a new one.' , 'wporg-5ftf' );
2019-10-25 22:07:09 +03:00
?>
</ p >
2024-09-02 19:09:08 +03:00
</ div >
2019-10-25 22:07:09 +03:00
2024-09-02 19:09:08 +03:00
< form action = " " method = " get " >
< input type = " hidden " name = " pledge_id " value = " <?php echo esc_attr( $pledge_id ); ?> " />
< input type = " hidden " name = " action " value = " resend_pledge_confirmation " />
2019-10-27 07:18:28 +02:00
2024-09-02 19:09:08 +03:00
< p class = " wp-block-button is-small " >
< input
type = " submit "
class = " button wp-block-button__link "
value = " <?php esc_html_e( 'Resend confirmation', 'wporg-5ftf' ); ?> "
/>
</ p >
</ form >
2019-10-25 22:07:09 +03:00
< ? php endif ; ?>