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
<script> | |
setTimeout(function () { | |
DiviArea.show('contact'); | |
}, 5000); | |
</script> |
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
<script> | |
(function () { | |
// TODO: Adjust the following two lines: | |
var popup = 'contact'; // Your Popup ID. | |
var delay = 5; // Delay [in seconds]. | |
setTimeout(function () { | |
DiviArea.show(popup); | |
}, delay * 1000); |
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
<script> | |
(function ($) { | |
// TODO: Adjust the following to lines to your needs: | |
var popup = 'contact'; // Your Popup ID. | |
var distance = 500; // Scroll distance [pixel]. | |
$(window).on('scroll.popup_' + popup, function () { | |
// Check if the user scrolled far enough. |
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
<?php | |
/** | |
* How to use this snippet: | |
* | |
* 1. Click the "Download ZIP" button (top-right area) | |
* 2. Open wp-admin > Plugins > Add New | |
* 3. Click "Upload Plugin" and select the zip file | |
* 4. After uploading the zip file, activate the plugin | |
* | |
* ---------- |
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
/** | |
* Option 1: | |
* Open an existing Popup and change the URL of an iframe inside the Popup. | |
* | |
* Preparation: | |
* Create a Divi Area (or an On-Page Popup) which contains an iframe. | |
* | |
* @param {string} areaId - The ID of an existing Popup or Divi Area. | |
* @param {string} iframeUrl - The new URL of the iframe inside the Popup. | |
*/ |
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
<?php | |
/** | |
* Proof of concept for https://github.com/divimode/gdpr-cache-script-styles | |
*/ | |
/** | |
* Filter all scripts and style URLs. | |
* When an external URL is detected, download the file | |
* and replace it in the page source. |