Changeset 2086725
- Timestamp:
- 05/13/2019 11:07:52 AM (7 years ago)
- Location:
- splashpopup
- Files:
-
- 6 edited
-
assets/screenshot-2.png (modified) (previous)
-
trunk/admin/class-splash-popup-admin.php (modified) (1 diff)
-
trunk/admin/partials/splash-popup-admin-display.php (modified) (2 diffs)
-
trunk/backend.png (modified) (previous)
-
trunk/includes/class-splash-popup.php (modified) (3 diffs)
-
trunk/splash-popup.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
splashpopup/trunk/admin/class-splash-popup-admin.php
r2085126 r2086725 111 111 $post = $_POST['splashinfo']; 112 112 $info = 0; 113 114 113 115 114 116 115 if(intval($post['duration']) <= 0 ){ -
splashpopup/trunk/admin/partials/splash-popup-admin-display.php
r2085126 r2086725 2 2 3 3 if(intval($duration) == 0){ 4 $duration = 30; 4 $duration = 30; // sec 5 } 6 7 if(intval($popup_interval) == 0){ 8 $popup_interval = 5; // 5min 5 9 } 6 10 … … 102 106 <tr> 103 107 <td class="left"> 104 Popup Duration ( n)108 Popup Duration (N Sec) 105 109 </td> 106 110 107 111 <td> 108 <input type=" text" name="splashinfo[duration]" id="splashduration" value="<?php echo intval($duration) ;?>" placeholder="30" />112 <input type="number" name="splashinfo[duration]" id="splashduration" value="<?php echo intval($duration) ;?>" placeholder="30" /> 109 113 <small> Popup will automatically hide after n second (Default 30 Sec. )</small> 110 114 111 115 </td> 112 </tr> 116 </tr> 117 118 119 <tr> 120 <td class="left"> 121 Popup Interval (N Min) 122 </td> 123 124 <td> 125 <input type="number" name="splashinfo[popup_interval]" id="splashinterval" value="<?php echo intval($popup_interval) ;?>" placeholder="5" /> 126 <small> Popup will apear every after N min, (Default 5 Min) </small> 127 128 </td> 129 </tr> 130 113 131 114 132 <tr> -
splashpopup/trunk/includes/class-splash-popup.php
r2085126 r2086725 172 172 private function define_public_hooks() { 173 173 174 174 $popup_cookie = "popup_cookie"; 175 $popup_cookie_value = "yes"; 175 176 176 177 … … 178 179 $data = unserialize($splashinfo); 179 180 extract($data); 180 181 if(isset($is_active) && intval($is_active) == 1 && $this->splash_within_time_slot() ){ 181 $popup_interval = intval($popup_interval); 182 183 $popup_shown = $_COOKIE[$popup_cookie] == "yes"; // 1/0 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 if(isset($is_active) && intval($is_active) == 1 && $this->splash_within_time_slot() && !$popup_shown){ 182 203 183 204 … … 193 214 } 194 215 195 216 217 218 219 220 if($popup_interval == 0 ){ // popup interval is with in the data var. 221 $popup_interval = 5; // default 5 min 222 } 223 224 // popup already show in this session 225 // save the interval into cookie 226 setcookie($popup_cookie, $popup_cookie_value, time() + $popup_interval*60, "/"); // 60sec = 1 min 196 227 197 228 -
splashpopup/trunk/splash-popup.php
r2085126 r2086725 17 17 * Plugin URI: https://github.com/kernelroni/splashpopup 18 18 * Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area. 19 * Version: 1.0. 019 * Version: 1.0.1 20 20 * Author: Roni Das 21 21 * Author URI: https://github.com/kernelroni
Note: See TracChangeset
for help on using the changeset viewer.