- Timestamp:
- 09/18/2023 08:33:14 AM (19 months ago)
- Location:
- poptin/trunk
- Files:
-
- 5 edited
-
class-affiliate.php (modified) (10 diffs)
-
deactivate-form.php (modified) (4 diffs)
-
poptin.php (modified) (8 diffs)
-
readme.txt (modified) (1 diff)
-
views/poptin_admin_view.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
poptin/trunk/class-affiliate.php
r2336639 r2968210 17 17 public function affiliate_program() { 18 18 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'); 21 21 if (!empty($nonce) && wp_verify_nonce($nonce, $this->plugin_slug . "_affiliate_program")) { 22 22 if ($days == -1) { … … 49 49 ?> 50 50 <style> 51 .<?php echo $this->plugin_slug?>-premio-affiliate p a {51 .<?php echo esc_attr($this->plugin_slug) ?>-premio-affiliate p a { 52 52 display: inline-block; 53 53 float: right; … … 58 58 top: 12px; 59 59 } 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 { 61 61 color: #333333; 62 62 } 63 .<?php echo $this->plugin_slug?>-premio-affiliate .button span {63 .<?php echo esc_attr($this->plugin_slug) ?>-premio-affiliate .button span { 64 64 display: inline-block; 65 65 line-height: 27px; 66 66 font-size: 16px; 67 67 } 68 .<?php echo $this->plugin_slug?>-premio-affiliate {68 .<?php echo esc_attr($this->plugin_slug) ?>-premio-affiliate { 69 69 padding: 1px 100px 12px 12px; 70 70 margin: 15px 15px 2px; 71 71 position: relative; 72 72 } 73 .<?php echo $this->plugin_slug?>-affiliate-popup {73 .<?php echo esc_attr($this->plugin_slug) ?>-affiliate-popup { 74 74 position: fixed; 75 75 width: 100%; … … 81 81 display: none; 82 82 } 83 .<?php echo $this->plugin_slug?>-affiliate-popup-content {83 .<?php echo esc_attr($this->plugin_slug) ?>-affiliate-popup-content { 84 84 background: #ffffff; 85 85 padding: 20px; … … 95 95 border-radius: 5px;: ; 96 96 } 97 .<?php echo $this->plugin_slug?>-affiliate-title {97 .<?php echo esc_attr($this->plugin_slug) ?>-affiliate-title { 98 98 padding: 0 0 10px 0; 99 99 font-weight: bold; 100 100 } 101 .<?php echo $this->plugin_slug?>-affiliate-options a {101 .<?php echo esc_attr($this->plugin_slug) ?>-affiliate-options a { 102 102 display: block; 103 103 margin: 5px 0 5px 0; … … 105 105 text-decoration: none; 106 106 } 107 .<?php echo $this->plugin_slug?>-affiliate-options a.dismiss {107 .<?php echo esc_attr($this->plugin_slug) ?>-affiliate-options a.dismiss { 108 108 color: #999; 109 109 } 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 { 111 111 color: #0073aa; 112 112 } 113 button.<?php echo $this->plugin_slug?>-close-affiliate-popup {113 button.<?php echo esc_attr($this->plugin_slug) ?>-close-affiliate-popup { 114 114 position: absolute; 115 115 top: 5px; … … 119 119 cursor: pointer; 120 120 } 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 { 122 122 font-size: 14px; 123 123 background: #F51366; … … 132 132 } 133 133 </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> 136 136 <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> 138 138 </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> 147 147 </div> 148 148 </div> … … 150 150 <script> 151 151 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(); 154 154 }); 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(); 157 157 }); 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(){ 159 159 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(); 162 162 jQuery.ajax({ 163 163 url: "<?php echo admin_url("admin-ajax.php") ?>", … … 165 165 type: "post", 166 166 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(); 169 169 } 170 170 }); -
poptin/trunk/deactivate-form.php
r2439665 r2968210 118 118 <form action="#" method="post" id="poptin-deactivate-form"> 119 119 <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> 121 121 </div> 122 122 <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> 124 124 <div class="form-control"> 125 125 <input type="email" value="<?php echo get_option( 'admin_email' ) ?>" placeholder="<?php echo _e("Email address", 'poptin') ?>" id="poptin-deactivation-email_id"> … … 127 127 <div class="form-control"> 128 128 <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> 130 130 </div> 131 131 </div> 132 132 <div class="poptin-popup-footer"> 133 133 <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'); ?> 135 135 </label> 136 136 <input type="button" class="button button-secondary button-skip poptin-popup-skip-feedback" value="Skip & Deactivate"> … … 138 138 <span class="poptin-spinner"><img src="<?php echo esc_url(admin_url('/images/spinner.gif')); ?>" alt=""></span> 139 139 <input type="submit" class="button button-secondary button-deactivate poptin-popup-allow-deactivate" value="Submit & 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> 141 141 </div> 142 142 </div> … … 199 199 reason: _reason, 200 200 email_id: email_id, 201 nonce: '<?php e sc_attr_e(wp_create_nonce("poptin_deactivate_nonce")) ?>'201 nonce: '<?php echo esc_attr(wp_create_nonce("poptin_deactivate_nonce")) ?>' 202 202 }, 203 203 beforeSend: function () { -
poptin/trunk/poptin.php
r2602192 r2968210 4 4 Contributors: galdub, tomeraharon 5 5 Description: 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 6 Version: 1.3.1 7 7 Author: Poptin 8 8 Author URI: https://www.poptin.com … … 13 13 14 14 // Prevent direct file access 15 use Hummingbird\Core\Utils; 16 15 17 if (!defined('ABSPATH')) { 16 18 exit; 17 19 } 18 20 19 define('POPTIN_VERSION', '1. 6');21 define('POPTIN_VERSION', '1.3.1'); 20 22 define('POPTIN_PATH', dirname(__FILE__)); 21 23 define('POPTIN_PATH_INCLUDES', dirname(__FILE__) . '/inc'); … … 165 167 $response['message'] = ""; 166 168 $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'); 169 171 if (empty($reason)) { 170 172 $errorCounter++; 171 173 $response['message'] = "Please provide reason"; 172 174 } 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'); 174 176 $errorCounter++; 175 177 $response['valid'] = 0; 176 178 } else { 177 179 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'); 179 181 $errorCounter++; 180 182 $response['valid'] = 0; … … 204 206 <tr> 205 207 <th>Plugin Version</th> 206 <td><?php e sc_attr_e(POPTIN_VERSION) ?></td>208 <td><?php echo esc_attr(POPTIN_VERSION) ?></td> 207 209 </tr> 208 210 <tr> … … 212 214 <tr> 213 215 <th>Email</th> 214 <td><?php e sc_attr_e($email) ?></td>216 <td><?php echo esc_attr($email) ?></td> 215 217 </tr> 216 218 <tr> 217 219 <th>Reason</th> 218 <td><?php e sc_attr_e(nl2br($reason)) ?></td>220 <td><?php echo nl2br(esc_attr($reason)) ?></td> 219 221 </tr> 220 222 <tr> 221 223 <th>WordPress Version</th> 222 <td><?php e sc_attr_e(get_bloginfo('version')) ?></td>224 <td><?php echo esc_attr(get_bloginfo('version')) ?></td> 223 225 </tr> 224 226 <tr> 225 227 <th>PHP Version</th> 226 <td><?php e sc_attr_e(PHP_VERSION) ?></td>228 <td><?php echo esc_attr(PHP_VERSION) ?></td> 227 229 </tr> 228 230 </table> … … 642 644 function poptin_shortcode($arguments) 643 645 { 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 } 646 650 } 647 651 // add_shortcode('poptin-embed', 'poptin_shortcode'); … … 656 660 function poptin_shortcode_form($arguments) 657 661 { 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 } 660 666 } 661 667 add_shortcode('poptin-form', 'poptin_shortcode_form'); … … 811 817 if (class_exists('\Hummingbird\Core\Utils')) { 812 818 813 $modules = \Hummingbird\Core\Utils::get_active_cache_modules();819 $modules = Utils::get_active_cache_modules(); 814 820 foreach ($modules as $module => $name) { 815 $mod = \Hummingbird\Core\Utils::get_module($module);821 $mod = Utils::get_module($module); 816 822 817 823 if ($mod->is_active()) { -
poptin/trunk/readme.txt
r2962879 r2968210 265 265 == Changelog == 266 266 267 = 1.3.1 = 268 Shortcode bug fixed 269 267 270 = 1.3 = 268 271 Brand new design for the Poptin WordPress plugin 🥳 -
poptin/trunk/views/poptin_admin_view.php
r2835850 r2968210 57 57 58 58 <!-- <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"> 60 60 Go to your Dashboard <img src="<?php echo POPTIN_URL . '/assets/images/polygon.svg' ?>" alt=""> 61 61 </a>
Note: See TracChangeset
for help on using the changeset viewer.