Support » Plugin: GDPR Cookie Compliance (CCPA ready) » 3rd Party Cookies accept check shortcode

  • Resolved madpeter

    (@madpeter)


    is there a easy to use shortcode to check if 3rd party cookies have been accepted
    and display content in a block

    example

    [cookie-3p-accepted]
    Content from 3rd party loads here
    [/cookie-3p-accepted]
    [cookie-3p-rejected]
    Sorry you have 3rd party cookies currently rejected we can not
    display this content without it.

    you can change your setting here (settings link)
    or goto the page directly (link to content)
    [/cookie-3p-rejected]

    as having writers try and understand javascript is a bit much

Viewing 1 replies (of 1 total)
  • Plugin Author Moove Agency

    (@mooveagency)

    Hi @madpeter

    There is a PHP function available:

    if ( function_exists( 'gdpr_cookie_is_accepted' ) ) {
      /* supported types: 'strict', 'thirdparty', 'advanced' */
      if ( gdpr_cookie_is_accepted( 'thirdparty' ) ) {
        echo "GDPR third party ENABLED content";
      } else {
        echo "GDPR third party RESTRICTED content";
      }
    }
    

    Or iframe blocking functionality is available as pr3mium feature:
    https://ps.w.org/gdpr-cookie-compliance/assets/screenshot-34.png?rev=2263873
    It works out of the box on the WYSIWYG sections of the default editor.

    You can also use the following pr3mium shortcode to block the iframe outside of default WYSIWYG editors:

    [gdpr_iframe_blocker] Put iframe or URL here [/gdpr_iframe_blocker]

    Hope this helps.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.