Plugin Directory

Changeset 2968210 for poptin


Ignore:
Timestamp:
09/18/2023 08:33:14 AM (19 months ago)
Author:
galdub
Message:

trunk 1.3.1

Location:
poptin/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • poptin/trunk/class-affiliate.php

    r2336639 r2968210  
    1717    public function affiliate_program() {
    1818        if(current_user_can('manage_options')) {
    19             $nonce = filter_input(INPUT_POST, 'nonce', FILTER_SANITIZE_STRING);
    20             $days = filter_input(INPUT_POST, 'days', FILTER_SANITIZE_STRING);
     19            $nonce = filter_input(INPUT_POST, 'nonce');
     20            $days = filter_input(INPUT_POST, 'days');
    2121            if (!empty($nonce) && wp_verify_nonce($nonce, $this->plugin_slug . "_affiliate_program")) {
    2222                if ($days == -1) {
     
    4949            ?>
    5050            <style>
    51                 .<?php echo $this->plugin_slug ?>-premio-affiliate p a {
     51                .<?php echo esc_attr($this->plugin_slug) ?>-premio-affiliate p a {
    5252                    display: inline-block;
    5353                    float: right;
     
    5858                    top: 12px;
    5959                }
    60                 .<?php echo $this->plugin_slug ?>-premio-affiliate p a:hover, .<?php echo $this->plugin_slug ?>-premio-affiliate p a:focus {
     60                .<?php echo esc_attr($this->plugin_slug) ?>-premio-affiliate p a:hover, .<?php echo esc_attr($this->plugin_slug) ?>-premio-affiliate p a:focus {
    6161                    color: #333333;
    6262                }
    63                 .<?php echo $this->plugin_slug ?>-premio-affiliate .button span {
     63                .<?php echo esc_attr($this->plugin_slug) ?>-premio-affiliate .button span {
    6464                    display: inline-block;
    6565                    line-height: 27px;
    6666                    font-size: 16px;
    6767                }
    68                 .<?php echo $this->plugin_slug ?>-premio-affiliate {
     68                .<?php echo esc_attr($this->plugin_slug) ?>-premio-affiliate {
    6969                    padding: 1px 100px 12px 12px;
    7070                    margin: 15px 15px 2px;
    7171                    position: relative;
    7272                }
    73                 .<?php echo $this->plugin_slug ?>-affiliate-popup {
     73                .<?php echo esc_attr($this->plugin_slug) ?>-affiliate-popup {
    7474                    position: fixed;
    7575                    width: 100%;
     
    8181                    display: none;
    8282                }
    83                 .<?php echo $this->plugin_slug ?>-affiliate-popup-content {
     83                .<?php echo esc_attr($this->plugin_slug) ?>-affiliate-popup-content {
    8484                    background: #ffffff;
    8585                    padding: 20px;
     
    9595                    border-radius: 5px;: ;
    9696                }
    97                 .<?php echo $this->plugin_slug ?>-affiliate-title {
     97                .<?php echo esc_attr($this->plugin_slug) ?>-affiliate-title {
    9898                    padding: 0 0 10px 0;
    9999                    font-weight: bold;
    100100                }
    101                 .<?php echo $this->plugin_slug ?>-affiliate-options a {
     101                .<?php echo esc_attr($this->plugin_slug) ?>-affiliate-options a {
    102102                    display: block;
    103103                    margin: 5px 0 5px 0;
     
    105105                    text-decoration: none;
    106106                }
    107                 .<?php echo $this->plugin_slug ?>-affiliate-options a.dismiss {
     107                .<?php echo esc_attr($this->plugin_slug) ?>-affiliate-options a.dismiss {
    108108                    color: #999;
    109109                }
    110                 .<?php echo $this->plugin_slug ?>-affiliate-options a:hover, .affiliate-options a:focus {
     110                .<?php echo esc_attr($this->plugin_slug) ?>-affiliate-options a:hover, .affiliate-options a:focus {
    111111                    color: #0073aa;
    112112                }
    113                 button.<?php echo $this->plugin_slug ?>-close-affiliate-popup {
     113                button.<?php echo esc_attr($this->plugin_slug) ?>-close-affiliate-popup {
    114114                    position: absolute;
    115115                    top: 5px;
     
    119119                    cursor: pointer;
    120120                }
    121                 a.button.button-primary.<?php echo $this->plugin_slug ?>-affiliate-btn {
     121                a.button.button-primary.<?php echo esc_attr($this->plugin_slug) ?>-affiliate-btn {
    122122                    font-size: 14px;
    123123                    background: #F51366;
     
    132132                }
    133133            </style>
    134             <div class="notice admin-poptin-box notice-info <?php echo $this->plugin_slug ?>-premio-affiliate <?php echo $this->plugin_slug ?>-premio-affiliate">
    135                 <p>Hi there, you've been using <?php echo $this->plugin_name ?> for a while now. Do you know that <b><?php echo $this->plugin_name ?></b> has an affiliate program? Join now and get <b>25% lifetime commission</b> <a href="javascript:;" class="dismiss-btn"><span class="dashicons dashicons-no-alt"></span> Dismiss</a></p>
     134            <div class="notice admin-poptin-box notice-info <?php echo esc_attr($this->plugin_slug) ?>-premio-affiliate <?php echo esc_attr($this->plugin_slug) ?>-premio-affiliate">
     135                <p>Hi there, you've been using <?php echo esc_attr($this->plugin_name) ?> for a while now. Do you know that <b><?php echo esc_attr($this->plugin_name) ?></b> has an affiliate program? Join now and get <b>25% lifetime commission</b> <a href="javascript:" class="dismiss-btn"><span class="dashicons dashicons-no-alt"></span> Dismiss</a></p>
    136136                <div class="clear clearfix"></div>
    137                 <a class="button button-primary <?php echo $this->plugin_slug ?>-affiliate-btn" target="_blank" href="https://www.poptin.com/affiliate/?utm_source=wordpressplugin&domain=<?php echo $_SERVER['HTTP_HOST'] ?>">Tell me more <span class="dashicons dashicons-arrow-right-alt"></span></a>
     137                <a class="button button-primary <?php echo esc_attr($this->plugin_slug) ?>-affiliate-btn" target="_blank" href="https://www.poptin.com/affiliate/?utm_source=wordpressplugin&domain=<?php echo esc_url($_SERVER['HTTP_HOST']) ?>">Tell me more <span class="dashicons dashicons-arrow-right-alt"></span></a>
    138138            </div>
    139             <div class="<?php echo $this->plugin_slug ?>-affiliate-popup">
    140                 <div class="<?php echo $this->plugin_slug ?>-affiliate-popup-content">
    141                     <button class="<?php echo $this->plugin_slug ?>-close-affiliate-popup"><span class="dashicons dashicons-no-alt"></span></button>
    142                     <div class="<?php echo $this->plugin_slug ?>-affiliate-title">Would you like us to remind you about this later?</div>
    143                     <div class="<?php echo $this->plugin_slug ?>-affiliate-options">
    144                         <a href="javascript:;" data-days="3">Remind me in 3 days</a>
    145                         <a href="javascript:;" data-days="10">Remind me in 10 days</a>
    146                         <a href="javascript:;" data-days="-1" class="dismiss">Don't remind me about this</a>
     139            <div class="<?php echo esc_attr($this->plugin_slug) ?>-affiliate-popup">
     140                <div class="<?php echo esc_attr($this->plugin_slug) ?>-affiliate-popup-content">
     141                    <button class="<?php echo esc_attr($this->plugin_slug) ?>-close-affiliate-popup"><span class="dashicons dashicons-no-alt"></span></button>
     142                    <div class="<?php echo esc_attr($this->plugin_slug) ?>-affiliate-title">Would you like us to remind you about this later?</div>
     143                    <div class="<?php echo esc_attr($this->plugin_slug) ?>-affiliate-options">
     144                        <a href="javascript:" data-days="3">Remind me in 3 days</a>
     145                        <a href="javascript:" data-days="10">Remind me in 10 days</a>
     146                        <a href="javascript:" data-days="-1" class="dismiss">Don't remind me about this</a>
    147147                    </div>
    148148                </div>
     
    150150            <script>
    151151                jQuery(document).ready(function(){
    152                     jQuery(document).on("click", ".<?php echo $this->plugin_slug ?>-premio-affiliate p a.dismiss-btn", function(){
    153                         jQuery(".<?php echo $this->plugin_slug ?>-affiliate-popup").show();
     152                    jQuery(document).on("click", ".<?php echo esc_attr($this->plugin_slug) ?>-premio-affiliate p a.dismiss-btn", function(){
     153                        jQuery(".<?php echo esc_attr($this->plugin_slug) ?>-affiliate-popup").show();
    154154                    });
    155                     jQuery(document).on("click", ".<?php echo $this->plugin_slug ?>-close-affiliate-popup", function(){
    156                         jQuery(".<?php echo $this->plugin_slug ?>-affiliate-popup").hide();
     155                    jQuery(document).on("click", ".<?php echo esc_attr($this->plugin_slug) ?>-close-affiliate-popup", function(){
     156                        jQuery(".<?php echo esc_attr($this->plugin_slug) ?>-affiliate-popup").hide();
    157157                    });
    158                     jQuery(document).on("click", ".<?php echo $this->plugin_slug ?>-affiliate-options a", function(){
     158                    jQuery(document).on("click", ".<?php echo esc_attr($this->plugin_slug) ?>-affiliate-options a", function(){
    159159                        var dataDays = jQuery(this).attr("data-days");
    160                         jQuery(".<?php echo $this->plugin_slug ?>-affiliate-popup").hide();
    161                         jQuery(".<?php echo $this->plugin_slug ?>-premio-affiliate").hide();
     160                        jQuery(".<?php echo esc_attr($this->plugin_slug) ?>-affiliate-popup").hide();
     161                        jQuery(".<?php echo esc_attr($this->plugin_slug) ?>-premio-affiliate").hide();
    162162                        jQuery.ajax({
    163163                            url: "<?php echo admin_url("admin-ajax.php") ?>",
     
    165165                            type: "post",
    166166                            success: function() {
    167                                 jQuery(".<?php echo $this->plugin_slug ?>-affiliate-popup").remove();
    168                                 jQuery(".<?php echo $this->plugin_slug ?>-premio-affiliate").remove();
     167                                jQuery(".<?php echo esc_attr($this->plugin_slug) ?>-affiliate-popup").remove();
     168                                jQuery(".<?php echo esc_attr($this->plugin_slug) ?>-premio-affiliate").remove();
    169169                            }
    170170                        });
  • poptin/trunk/deactivate-form.php

    r2439665 r2968210  
    118118        <form action="#" method="post" id="poptin-deactivate-form">
    119119            <div class="poptin-popup-header">
    120                 <h2><?php esc_attr_e('Quick feedback about Poptin', 'poptin'); ?> 🙏</h2>
     120                <h2><?php esc_html_e('Quick feedback about Poptin', 'poptin'); ?> 🙏</h2>
    121121            </div>
    122122            <div class="poptin-popup-body">
    123                 <h3><?php esc_attr_e('Your feedback will help us improve the product, please tell us why did you decide to deactivate Poptin :)', 'poptin'); ?></h3>
     123                <h3><?php esc_html_e('Your feedback will help us improve the product, please tell us why did you decide to deactivate Poptin :)', 'poptin'); ?></h3>
    124124                <div class="form-control">
    125125                    <input type="email" value="<?php echo get_option( 'admin_email' ) ?>" placeholder="<?php echo _e("Email address", 'poptin') ?>" id="poptin-deactivation-email_id">
     
    127127                <div class="form-control">
    128128                    <label></label>
    129                     <textarea placeholder="<?php esc_attr_e("Your comment", 'poptin') ?>" id="poptin-deactivation-comment"></textarea>
     129                    <textarea placeholder="<?php esc_html_e("Your comment", 'poptin') ?>" id="poptin-deactivation-comment"></textarea>
    130130                </div>
    131131            </div>
    132132            <div class="poptin-popup-footer">
    133133                <label class="poptin-anonymous">
    134                     <input type="checkbox"/><?php esc_attr_e('Anonymous feedback', 'poptin'); ?>
     134                    <input type="checkbox"/><?php esc_html_e('Anonymous feedback', 'poptin'); ?>
    135135                </label>
    136136                <input type="button" class="button button-secondary button-skip poptin-popup-skip-feedback" value="Skip &amp; Deactivate">
     
    138138                    <span class="poptin-spinner"><img src="<?php echo esc_url(admin_url('/images/spinner.gif')); ?>" alt=""></span>
    139139                    <input type="submit" class="button button-secondary button-deactivate poptin-popup-allow-deactivate" value="Submit &amp; Deactivate" disabled="disabled">
    140                     <a href="#" class="button button-primary poptin-popup-button-close"><?php esc_attr_e('Cancel', 'poptin'); ?></a>
     140                    <a href="#" class="button button-primary poptin-popup-button-close"><?php esc_html_e('Cancel', 'poptin'); ?></a>
    141141                </div>
    142142            </div>
     
    199199                        reason: _reason,
    200200                        email_id: email_id,
    201                         nonce: '<?php esc_attr_e(wp_create_nonce("poptin_deactivate_nonce")) ?>'
     201                        nonce: '<?php echo esc_attr(wp_create_nonce("poptin_deactivate_nonce")) ?>'
    202202                    },
    203203                    beforeSend: function () {
  • poptin/trunk/poptin.php

    r2602192 r2968210  
    44Contributors: galdub, tomeraharon
    55Description: Use Poptin to get more leads, sales, and email subscribers. Create targeted beautiful pop ups and forms in less than 2 minutes with ease.
    6 Version: 1.3
     6Version: 1.3.1
    77Author: Poptin
    88Author URI: https://www.poptin.com
     
    1313
    1414// Prevent direct file access
     15use Hummingbird\Core\Utils;
     16
    1517if (!defined('ABSPATH')) {
    1618    exit;
    1719}
    1820
    19 define('POPTIN_VERSION', '1.6');
     21define('POPTIN_VERSION', '1.3.1');
    2022define('POPTIN_PATH', dirname(__FILE__));
    2123define('POPTIN_PATH_INCLUDES', dirname(__FILE__) . '/inc');
     
    165167            $response['message'] = "";
    166168            $response['valid'] = 1;
    167             $reason = filter_input(INPUT_POST, 'reason', FILTER_SANITIZE_STRING);
    168             $nonce = filter_input(INPUT_POST, 'nonce', FILTER_SANITIZE_STRING);
     169            $reason = filter_input(INPUT_POST, 'reason');
     170            $nonce = filter_input(INPUT_POST, 'nonce');
    169171            if (empty($reason)) {
    170172                $errorCounter++;
    171173                $response['message'] = "Please provide reason";
    172174            } else if (empty($nonce)) {
    173                 $response['message'] = esc_attr__("Your request is not valid", CHT_OPT);
     175                $response['message'] = esc_html__("Your request is not valid", 'poptin');
    174176                $errorCounter++;
    175177                $response['valid'] = 0;
    176178            } else {
    177179                if (!wp_verify_nonce($nonce, 'poptin_deactivate_nonce')) {
    178                     $response['message'] = esc_attr__("Your request is not valid", CHT_OPT);
     180                    $response['message'] = esc_html__("Your request is not valid", 'poptin');
    179181                    $errorCounter++;
    180182                    $response['valid'] = 0;
     
    204206                    <tr>
    205207                        <th>Plugin Version</th>
    206                         <td><?php esc_attr_e(POPTIN_VERSION) ?></td>
     208                        <td><?php echo esc_attr(POPTIN_VERSION) ?></td>
    207209                    </tr>
    208210                    <tr>
     
    212214                    <tr>
    213215                        <th>Email</th>
    214                         <td><?php esc_attr_e($email) ?></td>
     216                        <td><?php echo esc_attr($email) ?></td>
    215217                    </tr>
    216218                    <tr>
    217219                        <th>Reason</th>
    218                         <td><?php esc_attr_e(nl2br($reason)) ?></td>
     220                        <td><?php echo nl2br(esc_attr($reason)) ?></td>
    219221                    </tr>
    220222                    <tr>
    221223                        <th>WordPress Version</th>
    222                         <td><?php esc_attr_e(get_bloginfo('version')) ?></td>
     224                        <td><?php echo esc_attr(get_bloginfo('version')) ?></td>
    223225                    </tr>
    224226                    <tr>
    225227                        <th>PHP Version</th>
    226                         <td><?php esc_attr_e(PHP_VERSION) ?></td>
     228                        <td><?php echo esc_attr(PHP_VERSION) ?></td>
    227229                    </tr>
    228230                </table>
     
    642644function poptin_shortcode($arguments)
    643645{
    644     $poptin_div_id = $arguments[0];
    645     echo "<div class='poptin-{$poptin_div_id}'></div>";
     646    if(isset($arguments[0]) && !empty($arguments[0])) {
     647        $poptin_div_id = $arguments[0];
     648        return "<div class='poptin-'".esc_attr($poptin_div_id)."'></div>";
     649    }
    646650}
    647651// add_shortcode('poptin-embed', 'poptin_shortcode');
     
    656660function poptin_shortcode_form($arguments)
    657661{
    658     $poptin_div_id = $arguments[0];
    659     echo "<div class='poptin-embedded' data-id='{$poptin_div_id}'></div>";
     662    if(isset($arguments[0]) && !empty($arguments[0])) {
     663        $poptin_div_id = $arguments[0];
     664        return "<div class='poptin-embedded' data-id='" . esc_attr($poptin_div_id) . "'></div>";
     665    }
    660666}
    661667add_shortcode('poptin-form', 'poptin_shortcode_form');
     
    811817        if (class_exists('\Hummingbird\Core\Utils')) {
    812818
    813             $modules   = \Hummingbird\Core\Utils::get_active_cache_modules();
     819            $modules   = Utils::get_active_cache_modules();
    814820            foreach ($modules as $module => $name) {
    815                 $mod = \Hummingbird\Core\Utils::get_module($module);
     821                $mod = Utils::get_module($module);
    816822
    817823                if ($mod->is_active()) {
  • poptin/trunk/readme.txt

    r2962879 r2968210  
    265265== Changelog ==
    266266
     267= 1.3.1 =
     268Shortcode bug fixed
     269
    267270= 1.3 =
    268271Brand new design for the Poptin WordPress plugin 🥳
  • poptin/trunk/views/poptin_admin_view.php

    r2835850 r2968210  
    5757
    5858                        <!-- <form id="" class="ppFormRegister ppForm" action="" target="" method="POST"> -->
    59                         <a class="cbutton dashboard-link goto_dashboard_button_pp_updatable" href="<?php echo $go_to_dashboard_url ?>" target="_blank">
     59                        <a class="cbutton dashboard-link goto_dashboard_button_pp_updatable" href="<?php echo esc_url($go_to_dashboard_url) ?>" target="_blank">
    6060                            Go to your Dashboard <img src="<?php echo POPTIN_URL . '/assets/images/polygon.svg' ?>" alt="">
    6161                        </a>
Note: See TracChangeset for help on using the changeset viewer.