• Resolved chrisch297

    (@chrisch297)


    I’m using the WPZoom Instagram Widget on my site and trying to block it with Complianz before the user has given their consent to display the Instagram posts. The placeholder is working fine, but Complianz doesn’t block the requests to the instagram server (in my case: cdninstagram.com).

    My Complianz settings:

    – In the wizard I selected Social-Media-Content and Instagram
    – In the integrations I selected Instagram and placeholder

    Any suggestions?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor jarnovos

    (@jarnovos)

    Hi @chrisch297,

    I suspect that these requests are made as a result of loading images from the Instagram CDN.

    If you would like to stop these images from loading without consent, therefore preventing the request to the Instagram CDN, you can apply the below filter as an MU Plugin. Copy the below code to a new .php file, and upload it to the folder /wp-content/mu-plugins/ on your site.

    <?php
    defined( 'ABSPATH' ) or die( "you do not have access to this page!" );
    
    /**
    * Block images from the Instagram CDN
    *
    * @param $tags
    * @return array
    */
    
    function cmplz_block_image_sources( $tags ) {
    	$tags[] = 'cdninstagram';
    
    	return $tags;
    }
    add_filter( 'cmplz_image_tags', 'cmplz_block_image_sources' );

    That should be it!
    Kind regards,
    Jarno

    Thread Starter chrisch297

    (@chrisch297)

    Hi @jarnovos,

    thanks so far. Your solution is working and the requests to cdninstagram.com are blocked.

    But I’m missing the “Click here to activate…”-button in my placeholder now. Without the filter in /mu-plugins, the button is shown.

    Any ideas?

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @chrisch297,

    The filter will add the placeholder to the actual image that is getting blocked, which in my case, is the one that appears in the “lightbox” after you click the initial thumbnail image.

    I recorded a short example video to demonstrate how this appears on my end: https://gyazo.com/4a7cb127d72bb73b88b1b7eac3938288

    Kind regards,
    Jarno

    Thread Starter chrisch297

    (@chrisch297)

    Thanks for your reply. The placeholder with the consent button is working fine in the “lightbox” as in your video.

    I’m talking about the widget, which shows the instagram posts in a grid view on my starting page. There should be also a placeholder with consent-button. The placehoder is shown, but the consent-button is missing. Without the cmplz_image_tags filter, the consent-button is shown.

    Plugin Author Aert Hulsebos

    (@aahulsebos)

    Hi @chrisch297,

    Can I trouble you for your URL? So I can have a look?

    regards Aert

    Thread Starter chrisch297

    (@chrisch297)

    The site is: https://neu.bsc-hamburg.de/

    As you can see, on the right-hand side below “BSC bei Instagram” the placeholder is shown for the instagram widget. But the consent-button is missing there. Without your code suggestion, the consent-button is shown. After giving consent, the instagram widget is loaded as expected.

    I’ve given the widget the css class “bsc-insta-feed” and set it as the target in the script-center. See screenshot here: https://s20.directupload.net/images/221104/zdp2w8u8.png

    Anything wrong with my settings?

    Another issue I noted:
    In the script center, I have two blocked plugins: Windfinder and Instagram. When a second URL is entered for the second blocked plugin (Instagram in my case) and saved, the second url appears under the first blocked plugin (Windfinder in my case) and not under the second.

    See screenshots:

    Entering second url for second blocked plugin:
    https://s20.directupload.net/images/221104/m98vva3c.png

    After saving:
    https://s20.directupload.net/images/221104/y8g5vujv.png

    Plugin Author Aert Hulsebos

    (@aahulsebos)

    Hi @chrisch297,

    The second issue I can reproduce, this only seems to happen when clicking the ‘general’ save button, not per block. Weird but we will fix it soon.

    For the first issue, you can only use the filter. Every is hosted locally, except the lightbox. Only then you will need a placeholder. Please try, and let me know!

    regards Aert

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Instagram with WPZoom Instagram Plugin’ is closed to new replies.