This file contains hidden or 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 | |
| add_action( 'wp_footer', 'my_custom_popup_scripts', 500 ); | |
| function my_custom_popup_scripts() { ?> | |
| <script type="text/javascript"> | |
| (function ($, document, undefined) { | |
| $('#pum-123') | |
| .on('pumAfterOpen', function () { |
This file contains hidden or 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 | |
| // As is this will check if the form is in a popup, if so set a cookie and close after 5 seconds. | |
| // Copy everything below this line. | |
| function custom_cf7_scripts() { ?> | |
| <script type="text/javascript"> | |
| var wpcf7Elm = document.querySelector('.wpcf7'); | |
| wpcf7Elm.addEventListener('wpcf7submit', function (event) { | |
| var $form = $(event.target), |
This file contains hidden or 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 | |
| /** | |
| * Moved to https://github.com/danieliser/WP-Product-In-Dash-Review-Requests | |
| */ |
This file contains hidden or 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 | |
| /** | |
| * Moved to https://github.com/danieliser/WP-Product-In-Dash-Review-Requests | |
| */ |
This file contains hidden or 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 | |
| /** | |
| * Copy the following to your themes functions.php file and customize as needed. | |
| * | |
| * This example specifically checks for a specific class `type1` on the clicked trigger. | |
| * If present then the hidden field is updated and a different redirect url is sent back. | |
| * | |
| * This example uses the following customizable information. | |
| * | |
| * Field Name: my_custom_field |
This file contains hidden or 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 | |
| /** | |
| * Initialize by calling Options::init( 'your_prefix' ); | |
| * | |
| * Get an option Options::get( 'key', 'default' ); | |
| * Update an option with Options::update( 'key', 'value' ); | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) { |
This file contains hidden or 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 | |
| function build_shortcode( $tag, $atts = array(), $content = false ) { | |
| $shortcode = '[' . $tag; | |
| if ( ! empty( $atts ) ) { | |
| foreach( $atts as $key => $value ) { | |
| if ( empty( $value ) || ! $value ) { | |
| continue; |
This file contains hidden or 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 | |
| add_action( 'wp_head', '_custom_head_scripts' ); | |
| function _custom_head_scripts() { | |
| // Change this. | |
| $popup_id = 123; ?> | |
| <script type="text/javascript"> | |
| (function ($) { |
This file contains hidden or 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
| (function ($) { | |
| var today = new Date(); | |
| $(document).ready(function () { | |
| if (today.getDay() > 0 && today.getDay() < 6) { | |
| $('#pum-123').popmake('open'); | |
| } | |
| }); | |
| }(jQuery)); |
This file contains hidden or 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 | |
| function edd_popup_terms_agreement() { | |
| if ( edd_get_option( 'show_agree_to_terms', false ) ) { | |
| $popup_id = '123'; | |
| $agree_text = edd_get_option( 'agree_text', '' ); | |
| $agree_label = edd_get_option( 'agree_label', __( 'Agree to Terms?', 'easy-digital-downloads' ) ); | |
| ?> | |
| <fieldset id="edd_terms_agreement"> | |
| <div id="edd_terms" style="display:none;"> |