Created
May 16, 2018 13:48
-
-
Save wpflippercode/97ea3c89de11d2e3ba72e36c6e1c0de0 to your computer and use it in GitHub Desktop.
Verify Cookies Consent Before Showing the Google Maps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('wpgmp_accept_cookies','wpgmp_accept_cookies'); | |
function wpgmp_accept_cookies($is_allowed) { | |
// cookies-notice plugin integration - | |
if( function_exists('cn_cookies_accepted') ) { | |
$is_allowed = cn_cookies_accepted(); | |
} | |
// cookies-consent plugin integration. You may change cookie name here according to your needs. | |
if( $_COOKIE['catAccCookies'] == 1 ) | |
{ | |
$is_allowed = true; | |
} | |
return $is_allowed; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment