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 custom_edd_all_access_check_current_download( $download_id = 0 ) { | |
static $cache = []; | |
if ( ! isset( $cache[ $download_id ] ) ) { | |
$cache[ $download_id ] = edd_all_access_check( [ | |
'download_id' => $download_id, | |
'price_id' => 0, |
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_filter( 'pum_registered_triggers', 'register_cutstom_click_block', 11 ); | |
function register_cutstom_click_block( $triggers = array() ) { | |
$triggers['click_block']['fields']['general']['requirements']['options']['form_submission'] = __( 'Form Submission' ); | |
return $triggers; | |
} | |
function cu_add_custom_popup_js( $js ) { |
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
{ | |
"name": "popup-maker/test-plugin", | |
"description": "description", | |
"minimum-stability": "stable", | |
"require": { | |
"pimple/pimple": "^3.3" | |
}, | |
"autoload": { | |
"psr-4": { | |
"DLI\\": "src/" |
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
javascript:(function($){ $('style#pum-highlighted').remove(); $('body').append($('<style>').attr('id', 'pum-highlighted').text('.pum-highlighted { background-color: rgba(255, 255, 0, .75)!important; }')); function highlight() { if ($('.pum-highlight').hasClass('pum-highlighted')) { $('.pum-highlight').removeClass('pum-highlighted'); } else { $('.pum-highlight').addClass('pum-highlighted'); } } $('.pum-trigger').toggleClass('pum-highlight'); if (window.pum_bookmark_button_highlighter === undefined) { window.pum_bookmark_button_highlighter = setInterval(function(){highlight()}, 500); } }(jQuery)); |
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
<?xml version="1.0"?> | |
<ruleset name="Code Atlantic - Coding-Standards - Short Arrays"> | |
<description>Code Atlantic Coding-Standards, keeping short array syntax.</description> | |
<!-- Include main ruleset.xml --> | |
<rule ref="./ruleset.xml"/> | |
<!-- Use short arrays --> | |
<rule ref="Generic.Arrays"> | |
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found" /> |
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
var mc1Submitted = false; | |
jQuery('#mc-embedded-subscribe-form').on('submit reset', function (event) { | |
console.log(event); | |
if ("submit" === event.type) { | |
mc1Submitted = true; | |
} else if ( "reset" === event.type && mc1Submitted ) { | |
console.log('success'); | |
} | |
}); |
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
{ | |
const $ = window.jQuery; | |
let currentForm, currentFormId; | |
$(document) | |
// Before all requests | |
.on('cf.ajax.request', function (event, obj) { | |
currentForm = obj.$form; | |
currentFormId = obj.formIdAttr; | |
}) |
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
<label> | |
<input type="checkbox" onclick="PUM.close(123); jQuery.pm_cookie('pum-123', true, '10 years', '/');" /> | |
Never Show Again | |
</label> |
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
function getPopupIDFromSlug(slug) { | |
var popups = Object.values(pum_vars.popups); | |
for(var i = 0; i < popups.length; i++) { | |
if (popups[i].slug === slug) { | |
return popups[i].id; | |
} | |
} | |
return null; | |
} |
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
(function ($) { | |
var popupID = 123, | |
hiddenFieldSelector = '#nf-field-1'; | |
$(document).on('pumBeforeOpen', '#pum-'+popupID, function () { | |
var trigger = $.fn.popmake.last_open_trigger[0], | |
field = $(hiddenFieldSelector); | |
if (trigger && "" !== trigger.href) { | |
field.val(trigger.href); |