From c4f2fe58ab847584ced0191fdec9010a42b9786c Mon Sep 17 00:00:00 2001 From: Ian Dunn Date: Sat, 26 Oct 2019 08:23:41 -0700 Subject: [PATCH] Pledge Form: Make email naming consistent. This helps distinguish between _pledge_ and _contributor_ emails, and _verifying_ auth tokens and _confirming_ pledges. --- plugins/wporg-5ftf/includes/email.php | 2 +- plugins/wporg-5ftf/includes/pledge-form.php | 4 ++-- plugins/wporg-5ftf/includes/pledge.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/wporg-5ftf/includes/email.php b/plugins/wporg-5ftf/includes/email.php index 2672f94..c909af9 100644 --- a/plugins/wporg-5ftf/includes/email.php +++ b/plugins/wporg-5ftf/includes/email.php @@ -61,7 +61,7 @@ function send_email( $to, $subject, $message ) { * @param int $pledge_id * @param string $action * @param int $action_page_id The ID of the page that the user will be taken back to, in order to process their - * verification request. + * confirmation request. * * @return string */ diff --git a/plugins/wporg-5ftf/includes/pledge-form.php b/plugins/wporg-5ftf/includes/pledge-form.php index 950a970..5d11fee 100755 --- a/plugins/wporg-5ftf/includes/pledge-form.php +++ b/plugins/wporg-5ftf/includes/pledge-form.php @@ -40,7 +40,7 @@ function render_form_new() { $view = 'form-pledge-confirm-email.php'; $pledge_id = filter_input( INPUT_GET, 'pledge_id', FILTER_VALIDATE_INT ); $unverified_token = filter_input( INPUT_GET, 'auth_token', FILTER_SANITIZE_STRING ); - $email_confirmed = process_email_confirmation( $pledge_id, $action, $unverified_token ); + $email_confirmed = process_pledge_confirmation_email( $pledge_id, $action, $unverified_token ); } ob_start(); @@ -126,7 +126,7 @@ function process_form_new() { * * @return bool */ -function process_email_confirmation( $pledge_id, $action, $unverified_token ) { +function process_pledge_confirmation_email( $pledge_id, $action, $unverified_token ) { $meta_key = PledgeMeta\META_PREFIX . 'pledge-email-confirmed'; $already_confirmed = get_post( $pledge_id )->$meta_key; diff --git a/plugins/wporg-5ftf/includes/pledge.php b/plugins/wporg-5ftf/includes/pledge.php index 88625dd..7e57b24 100755 --- a/plugins/wporg-5ftf/includes/pledge.php +++ b/plugins/wporg-5ftf/includes/pledge.php @@ -135,7 +135,7 @@ function create_new_pledge( $name ) { // The pledge's meta data is saved at this point via `save_pledge_meta()`, which is a `save_post` callback. if ( ! is_wp_error( $pledge_id ) ) { - send_pledge_verification_email( $pledge_id, get_post()->ID ); + send_pledge_confirmation_email( $pledge_id, get_post()->ID ); } return $pledge_id; @@ -146,11 +146,11 @@ function create_new_pledge( $name ) { * * @param int $pledge_id The ID of the pledge. * @param int $action_page_id The ID of the page that the user will be taken back to, in order to process their - * verification request. + * confirmation request. * * @return bool */ -function send_pledge_verification_email( $pledge_id, $action_page_id ) { +function send_pledge_confirmation_email( $pledge_id, $action_page_id ) { $pledge = get_post( $pledge_id ); $message =