Hi there,
Thanks for your comments.
Below the PHP hooks:
– You can check if the “Strictly Necessary Cookies” are accepted or not (return true if is accepted, false if not accepted): ?gdpr_cookie_is_accepted( 'strict' )
– You can check if the “Third Party Cookies” are accepted or not (return true if is accepted, false if not accepted): ?gdpr_cookie_is_accepted( 'thirdparty' )
– You can check if the “Advanced Cookies” are accepted or not (return true if is accepted, false if not accepted): ?gdpr_cookie_is_accepted( 'advanced' )
Note: You have to enable the force reload by adding the following line to the functions.php otherwise the hidden texts becomes visible for your visitors with the next page load. add_action( 'gdpr_force_reload', '__return_true' );
So based on the functions listed above, you can create your own conditions in your theme to display the relevant content based on the selected user preferences:
if ( function_exists( 'gdpr_cookie_is_accepted' ) ) :
if ( gdpr_cookie_is_accepted( 'thirdparty' ) ) :
echo "GDPR third party ENABLED content";
else :
echo "GDPR third party RESTRICTED content";
endif;
endif;
I hope this helps.