• Having a user click a link that verifies their email address seems to be lacking. I can’t find the functionality anywhere. So I decided to give it a go to code it up.

    I’ve started here https://github.com/magician11/wpcf7-email-verification

    As I’m coding it, I realise I could probably re-use some of the Contact Form 7 code. Is there is an API or some documentation for this?

    For example, to retrieve the posted_data for the sender’s email address I’ve written this little function..

    function wpcf7ev_get_senders_email_address($wpcf7_form)
    {
        // grab sender info
        $senderTags = $wpcf7_form->mail['sender'];
    
        // replace tag names with posted_data using regex
        return $sendersEmailAddress = preg_replace_callback('/\[(.+?)\]/',
                                     function ($matches) use ($wpcf7_form)
                                     {
                                         return $wpcf7_form->posted_data[$matches[1]];
                                     },
                                     $senderTags
                                     );
    }

    But this function (with probably error catching code) must already be in the core code of Contact Form 7?

    Any suggestions/feedback?

    Thanks.

    http://wordpress.org/plugins/contact-form-7/

  • The topic ‘coding an extension to Contact Form 7’ is closed to new replies.