How do I start the verification process for a customized thank you page in Wordpress?
You can easily add verification to any page by using the [tot-reputation-status] WordPress shortcode. Token of Trust automatically creates a Page that does exactly this (used as part of our Verification Gates feature). If you’d like to check it out - navigate to /verification-required on your site to take a peek. It will require that you sign in if you’re not already and in fact we recommend that you give it a try with a new user and incognito window.
Here’s more information on How to add shortcodes to a page if this is new to you. And if you’d like the verification process to start automatically you should use this version to auto-launch the process when the user is not verified: [tot-reputation-status auto-launch-when-not-verified="true" ]
This shortcode generates customizable blocks for different verification states. Here are the code snippets that show the filters we use and that you can replace in the usual way:
return apply_filters('tot_verification_gates_request_signin_block', "
You will need to sign-in before you can proceed.
");
There was a problem verifying you - please check back later.
return apply_filters('tot_verification_gates_approved_block', "
Thank you - you've been verified!
return apply_filters('tot_verification_gates_pending_block', "
Thank you - your verification has been submitted! Watch your email inbox. We will get that approved as quickly as we're able to!
return apply_filters('tot_verification_gates_rejected_block', "
You've not passed verification. Please contact us for more information!
Lastly here’s the ‘not verified’ block which is the state before users land on this page:
return apply_filters("tot_verification_gates_not_verified_block", '
'
. ''
. __('Verification', $tot_plugin_text_domain)
. ' '
. __(' is required before you can proceed.', 'token-of-trust')
. '
');
We don’t recommend changing the ‘not verified’ block since that could make you less resilient to plugin upgrades but it is possible for those that really need it. The main thing is to just be sure to keep this bit from the code above since it launches the verification snippet.
I want to show the user different things on a page depending upon their current verification state.
function tot_reputation_status_shortcode($attrs, $content = null)
Examples of how we do this can be found in this code: tot-get-verified.js.