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
| 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 | |
| }); |
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
| jQuery('.popmake .ninja-forms-form').on('submitResponse', function(e, response) { | |
| var $popup = jQuery(this).parents('.pum'), | |
| errors = response.errors; | |
| if (errors === false) { | |
| $popup.trigger('pumSetCookie'); | |
| setTimeout(function () { | |
| $popup.popmake('close'); | |
| }, 5000); // 5 seconds |
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 | |
| global $fs; | |
| $values = array( | |
| 'free1' => 'Free 1', | |
| 'free2' => 'Free 2', | |
| # if ( $fs->is__premium_only() ) : | |
| 'pro1' => 'Pro 1', | |
| 'pro2' => 'Pro 2', | |
| # endif; |
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 | |
| class Chain_Demo { | |
| private $variable = null; | |
| private $method = 'get'; | |
| public function set() { | |
| $this->method = 'set'; | |
| return $this; |
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', 'pum14_popup_reg_form_check', 1000 ); | |
| function pum14_popup_reg_form_check() { | |
| if ( isset( $_POST['form_id'] ) && $_POST['form_id'] == 'my_form' ) { | |
| ?> | |
| <script type="text/javascript"> | |
| PUM.open(123); | |
| </script> | |
| <?php | |
| } |
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 | |
| /** | |
| * Convert a comma separated file into an associated array. | |
| * The first row should contain the array keys. | |
| * | |
| * Example: | |
| * | |
| * @param string $filename Path to the CSV file | |
| * @param string $delimiter The separator used in the file | |
| * @return array |
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 ($) { | |
| $('.pum_sub_form').on('pumNewsletterSuccess pumNewsletterErrorAlreadySubscribed', function () { | |
| $(this).parents('.popmake').popmake('close'); | |
| }); |
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
| <input type="checkbox" value="1" name="popup_display_position_fixed" id="popup_display_position_fixed" <?php checked( $position_fixed, 1 ); ?>/> |
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 sort_by_string_position( $a, $b ) { | |
| $num = ' Pages Posts'; | |
| $ai = stripos( $num, $a ); | |
| $bi = stripos( $num, $b ); | |
| // If its not set move it to the end of the line. | |
| if ( ! $ai ) { | |
| $ai = strlen( $num ); | |
| } |
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 sort_array_using_array( $a, $b ) { | |
| $order = array( | |
| __( 'First', 'popup-maker' ), | |
| __( 'Second', 'popup-maker' ), | |
| __( 'Third', 'popup-maker' ), | |
| ); | |
| $ai = in_array( $a, $order ) ? array_search ( $a, $order ) : count( $order ) + 1; | |
| $bi = in_array( $b, $order ) ? array_search ( $b, $order ) : count( $order ) + 1; |