Pledge Form: Make email naming consistent.

This helps distinguish between _pledge_ and _contributor_ emails, and _verifying_ auth tokens and _confirming_ pledges.
This commit is contained in:
Ian Dunn 2019-10-26 08:23:41 -07:00
parent 35fa99324e
commit c4f2fe58ab
No known key found for this signature in database
GPG key ID: 99B971B50343CBCB
3 changed files with 6 additions and 6 deletions

View file

@ -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
*/

View file

@ -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;

View file

@ -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 =