View es5.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
/** | |
* ECMA2015 | |
*/ | |
function convertHex(hexCode, opacity = 1){ | |
var hex = hexCode.replace('#', ''); | |
if (hex.length === 3) { | |
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; | |
} |
View subscribe-to-download-popup-maker-ninja-forms.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
(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); |
View functions.php
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 get_plugin_install_count( $plugin ) { | |
$api = plugins_api( 'plugin_information', array( | |
'slug' => 'popup-maker', | |
'fields' => array( 'active_installs' => true ) | |
) ); | |
if( ! is_wp_error( $api ) ) { | |
return $api->active_installs; | |
} |
View functions.php
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 plugin_install_count_shortcode( $atts ) { | |
$a = shortcode_atts( array( | |
'plugin' => NULL, | |
), $atts ); | |
if( ! $a['plugin'] ) { | |
return; | |
} | |
View pm-mc4wp-close-popup-after-submit.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
jQuery(document).on('subscribe.mc4wp','.popmake-content .mc4wp-form', function() { | |
var $popup = PUM.getPopup(this); | |
$popup.trigger('pumSetCookie'); | |
setTimeout(function () { | |
$popup.popmake('close'); | |
}, 5000); // 5 seconds | |
}); |
View rename-plugins-after-update.php
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 | |
/** | |
* This code works to update addon/extension plugin slugs during update from a premapped list. | |
* | |
* Code likely needs to be run in separate plugin/theme/mu-plugin/drop-in. | |
* | |
* Tested Working On: | |
* - Single Site: Updates Page - Singe Plugin. |
View password-pages.php
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 | |
/** | |
* Conditions are applied to popups based on the current page being viewing. | |
* | |
* Ex. Show Popup if the current page is ____ (AND/OR) ____ | |
* | |
* | |
* All Conditions should return false by default AND only true if 100% matched. | |
* |
View functions.php
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 | |
/** | |
* Assumptions: | |
* - Form ID is #28 | |
* - Page ID is 406200 | |
* - Fields include radio for reason & extra details where needed. | |
*/ | |
NewerOlder