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
jQuery('#pum-123') | |
.on('pumBeforeOpen', function () { | |
var $iframe = jQuery('iframe', jQuery(this)), | |
src = $iframe.prop('src'); | |
$iframe.prop('src', '').prop('src', src + '?autoplay=1'); | |
}); |
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
jQuery('#pum-123') | |
.on('pumBeforeOpen', function () { | |
var $iframe = jQuery('iframe', jQuery(this)), | |
src = $iframe.prop('src'); | |
$iframe.prop('src', '').prop('src', src + '&autoplay=1'); | |
}); |
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
jQuery('#pum-123') | |
.on('pumBeforeClose', function () { | |
var $iframe = jQuery('iframe', jQuery(this)), | |
src = $iframe.prop('src'); | |
$iframe.prop('src', '').prop('src', src.replace('?autoplay=1', '')); | |
}); |
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
jQuery('#pum-123') | |
.on('pumBeforeOpen', function () { | |
var $video = jQuery('video', jQuery(this)); | |
$video[0].play(); | |
}); |
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
jQuery('#pum-123') | |
.on('pumBeforeClose', function () { | |
var $video = jQuery('video', jQuery(this)); | |
$video[0].pause(); | |
}); |
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
jQuery('#pum-123') | |
.on('pumBeforeClose', function () { | |
var $iframe = jQuery('iframe', jQuery(this)), | |
src = $iframe.prop('src'); | |
$iframe.prop('src', '').prop('src', src.replace('&autoplay=1', '')); | |
}); |
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
//Create a trigger from standard text. | |
[popup_trigger id="123"]Some Text[/popup_trigger] | |
//Make the trigger a <button> | |
[popup_trigger id="123" tag="button"]Button Text[/popup_trigger] | |
// Or even use other shortcodes. | |
[popup_trigger id="123"][button_shortcode][/popup_trigger] |
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 | |
function my_custom_popup_trigger( $is_loadable, $popup_id ) { | |
if ( $popup_id == 123 ) { | |
if ( $my_condition == true ) { | |
$is_loadable = true; | |
} | |
else { | |
$is_loadable = false | |
} |
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
jQuery('#pum-123') | |
.on('pumAfterOpen', function () { | |
setTimeout(function () { | |
jQuery(this).popmake('close'); | |
}, 10000); // 10 Seconds | |
}); |
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 | |
add_action( 'popmake_get_the_popup_data_attr', 'my_custom_popup_data_attr', 10, 2 ); | |
function my_custom_popup_data_attr( $data_attr, $popup_id ) { | |
if ( $popup_id == 123 && empty( $_GET['popup'] ) ) { | |
unset( $data_attr['meta']['auto_open'] ); | |
} | |
return $data_attr; | |
} |