Changeset 3458603
- Timestamp:
- 02/11/2026 04:10:01 AM (8 days ago)
- Location:
- sweepwidget/trunk
- Files:
-
- 1 added
- 2 deleted
- 3 edited
-
public/css/sw.css (modified) (1 diff)
-
public/js/iframeResizer.min.js (deleted)
-
public/js/jquery.js (deleted)
-
public/js/sweepwidget-admin.js (added)
-
readme.txt (modified) (2 diffs)
-
sweepwidget.php (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sweepwidget/trunk/public/css/sw.css
r2841328 r3458603 1 .sweepwidget_iframe_wrapper iframe { 2 width: 100%; 3 float:left; 4 } 5 6 .sweepwidget_content_wrapper { 7 width:100%; 8 margin:0 0 35px 0; 9 padding:20px 30px; 10 font-size:16px; 11 background:#e5f2ff; 12 border-radius:3px; 13 -webkit-border-radius:3px; 14 -moz-border-radius:3px; 15 -o-border-radius:3px; 16 -moz-box-sizing: border-box; 17 -webkit-box-sizing: border-box; 18 -ms-box-sizing: border-box; 19 box-sizing: border-box; 20 float:left; 21 } 22 1 /* SweepWidget WordPress Plugin - Admin Styles */ 2 3 /* === Wrapper === */ 23 4 #sweepwidget_wrapper { 24 width:100%; 25 margin-left:-20px; 26 padding-right:20px; 27 min-height:800px; 28 background:#fff; 29 float:left; 5 width: 100%; 6 margin-left: -20px; 7 padding-right: 20px; 8 min-height: 800px; 9 background: #fff; 10 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif; 11 float: left; 12 } 13 14 #sweepwidget_wrapper * { 15 box-sizing: border-box; 30 16 } 31 17 32 18 #sweepwidget_wrapper_inner { 33 width:100%; 34 padding:20px 30px 30px 30px; 35 -moz-box-sizing: border-box; 36 -webkit-box-sizing: border-box; 37 -ms-box-sizing: border-box; 38 box-sizing: border-box; 39 float:left; 40 } 41 42 #sweepwidget_header { 43 width:100%; 44 margin:0 0 20px 0; 45 text-align:center; 46 float:left; 47 } 48 49 #sweepwidget_header img { 50 width:100%; 51 max-width:350px; 52 } 53 54 #sweepwidget_nav_holder, #sweepwidget_nav_holder_2 { 55 width:100%; 56 margin:5px 0; 57 text-align:center; 58 float:left; 59 } 60 61 #sweepwidget_nav_holder a, #sweepwidget_nav_holder_2 a { 62 margin:0px 10px 10px 0; 63 padding:13px 25px; 64 background:#3652a3; 65 color:#fff; 66 font-size:17px; 67 text-decoration:none; 68 border-radius:30px; 69 -webkit-border-radius:30px; 70 -moz-border-radius:30px; 71 -o-border-radius:30px; 72 -webkit-transition: all .2s ease-in-out; 73 -moz-transition: all .2s ease-in-out; 74 -o-transition: all .2s ease-in-out; 75 -ms-transition: all .2s ease-in-out; 76 transition: all .2s ease-in-out; 77 display:inline-block; 78 } 79 80 #sweepwidget_nav_holder a:hover, #sweepwidget_nav_holder_2 a:hover { 81 opacity:0.8; 82 -webkit-transition: all .2s ease-in-out; 83 -moz-transition: all .2s ease-in-out; 84 -o-transition: all .2s ease-in-out; 85 -ms-transition: all .2s ease-in-out; 86 transition: all .2s ease-in-out; 87 } 88 89 #sweepwidget_campaigns_holder { 90 width:100%; 91 margin:25px 0 0 0; 92 font-size: 16px; 93 padding:30px; 94 background:#fff; 95 border:1px solid #ccc; 96 border-radius:3px; 97 -webkit-border-radius:3px; 98 -moz-border-radius:3px; 99 -o-border-radius:3px; 100 -moz-box-sizing: border-box; 101 -webkit-box-sizing: border-box; 102 -ms-box-sizing: border-box; 103 box-sizing: border-box; 104 float:left; 105 } 106 107 108 .user_competitions_each_holder { 109 width: 100%; 110 margin: 20px 0% 0 0%; 111 padding: 20px 0; 112 -webkit-box-shadow: 0px 0px 13px 0px rgb(215, 215, 215); 113 -moz-box-shadow: 0px 0px 13px 0px rgba(215, 215, 215); 114 box-shadow: 0px 0px 13px 0px rgba(215, 215, 215); 115 border-radius:15px; 116 -webkit-border-radius:15px; 117 -moz-border-radius:15px; 118 float: left; 119 } 120 121 .user_competitions_each_holder_inner { 122 width:90%; 123 padding-left:25px; 124 padding-right:3%; 125 float:left; 126 } 127 128 .user_competitions_each_holder_full { 129 width: 100%; 130 margin: 0; 131 float: left; 132 } 133 .user_competitions_each_holder_l { 134 width:20%; 135 max-width: 150px; 136 margin-right:25px; 137 margin-bottom:20px; 138 float: left; 139 } 140 .user_competitions_each_holder_l img { 141 width: 100%; 142 height: auto; 143 margin: 0px 0 0 0; 144 max-width: 100px; 145 float: left; 146 } 147 .user_competitions_each_holder_r { 148 width: 75%; 149 margin: 0; 150 float: left; 151 } 152 153 @media only screen and (max-width:1000px) { 154 155 .user_competitions_each_holder { 156 width: 100%; 157 margin: 20px 0 0 0; 158 } 159 160 } 161 162 @media only screen and (max-width:700px) { 163 .user_competitions_each_holder_inner { 164 width:100%; 165 padding-left:0; 166 float:left; 167 } 168 .user_competitions_each_holder_l { 169 width: 90%; 170 margin: 20px 5% 0 5%; 171 text-align: left; 172 float: left; 173 } 174 .user_competitions_each_holder_l img { 175 width: 125px; 176 height: auto; 177 margin: auto; 178 display: inline-block; 179 } 180 .user_competitions_each_holder_r { 181 width: 90%; 182 margin: 15px 5% 0 5%; 183 float: left; 184 } 185 .home_main_link_top { 186 float:none; 187 } 188 } 189 190 .user_competitions_each_header { 191 width: 100%; 192 padding: 0px 0 10px 0; 193 font-size: 20px; 194 float: left; 195 } 196 197 .user_competitions_each_header a { 198 color: #00b8e6; 199 } 200 201 .user_competitions_each_links { 202 width: 100%; 203 margin: 5px 0 0 0; 204 float: left; 205 } 206 207 .user_competitions_each_links a { 208 margin: 0 10px 15px 0; 209 padding: 7px 14px 7px 14px; 210 color: #fff; 211 font-size: 15px; 212 text-decoration:none; 213 background: #bbb; 214 border-radius: 30px; 215 -webkit-border-radius: 30px; 216 -moz-border-radius: 30px; 217 -o-border-radius: 30px; 218 float: left; 219 } 220 221 #get_embed_code { 222 width: 94%; 223 max-width: 500px; 224 padding: 10px 3% 10px 3%; 225 color: #999; 226 font-size: 15px; 227 text-align: center; 228 line-height: 24px; 229 text-decoration:none; 230 border: 3px solid #f0f0f0; 231 border-radius: 8px; 232 -webkit-border-radius: 8px; 233 -moz-border-radius: 8px; 234 -o-border-radius: 8px; 235 outline: none; 236 -webkit-transition: all .2s ease-in-out; 237 -moz-transition: all .2s ease-in-out; 238 -o-transition: all .2s ease-in-out; 239 -ms-transition: all .2s ease-in-out; 240 transition: all .2s ease-in-out; 241 display: inline-block; 242 } 243 244 #get_embed_code:focus { 245 outline: none; 246 border-color:#ddd; 247 -webkit-transition: all .2s ease-in-out; 248 -moz-transition: all .2s ease-in-out; 249 -o-transition: all .2s ease-in-out; 250 -ms-transition: all .2s ease-in-out; 251 transition: all .2s ease-in-out; 252 } 253 254 .get_embed_code { 255 width:100%; 256 margin: 6px 0 0px 0; 257 color: #33adff; 19 width: 100%; 20 max-width: 960px; 21 padding: 24px 32px 40px; 22 box-sizing: border-box; 23 float: left; 24 } 25 26 /* === Header === */ 27 #sweepwidget_wrapper #sweepwidget_header { 28 width: 100%; 29 margin: 0 0 8px; 30 padding: 0; 31 text-align: left; 32 float: left; 33 } 34 35 #sweepwidget_wrapper #sweepwidget_header img { 36 width: 100%; 37 max-width: 180px; 38 border: none; 39 outline: none; 40 } 41 42 /* === Welcome Banner === */ 43 #sweepwidget_wrapper .sweepwidget_content_wrapper { 44 width: 100%; 45 margin: 0 0 24px; 46 padding: 14px 20px; 47 font-size: 13px; 48 line-height: 20px; 49 color: #555; 50 background: #f8f9fa; 51 border: 1px solid #e8e8e8; 52 border-radius: 8px; 53 box-sizing: border-box; 54 float: left; 55 } 56 57 /* === Navigation === */ 58 #sweepwidget_wrapper #sweepwidget_nav_holder, 59 #sweepwidget_wrapper #sweepwidget_nav_holder_2 { 60 width: 100%; 61 margin: 4px 0; 62 text-align: left; 63 float: left; 64 } 65 66 #sweepwidget_wrapper #sweepwidget_nav_holder a { 67 margin: 0 10px 10px 0; 68 padding: 12px 28px !important; 69 background: #4a3aff !important; 70 color: #fff !important; 71 font-size: 15px !important; 72 font-weight: 600; 73 text-decoration: none !important; 74 border: 2px solid #4a3aff !important; 75 border-radius: 8px !important; 76 box-shadow: 0 2px 8px rgba(74, 58, 255, 0.2); 77 transition: all 0.15s ease; 78 display: inline-block; 79 } 80 81 #sweepwidget_wrapper #sweepwidget_nav_holder a:hover { 82 background: #3d2ee6 !important; 83 border-color: #3d2ee6 !important; 84 color: #fff !important; 85 box-shadow: 0 4px 12px rgba(74, 58, 255, 0.3); 86 } 87 88 #sweepwidget_wrapper #sweepwidget_nav_holder_2 a { 89 margin: 0 6px 8px 0; 90 padding: 8px 18px !important; 91 background: #fff !important; 92 color: #4a3aff !important; 93 font-size: 13px !important; 94 font-weight: 500; 95 text-decoration: none !important; 96 border: 1.5px solid #4a3aff !important; 97 border-radius: 8px !important; 98 transition: all 0.15s ease; 99 display: inline-block; 100 } 101 102 #sweepwidget_wrapper #sweepwidget_nav_holder_2 a:hover { 103 background: #4a3aff !important; 104 color: #fff !important; 105 } 106 107 /* === Margin Minimizer === */ 108 #sweepwidget_wrapper #margin_top_minimizer { 109 height: 4px; 110 float: left; 111 width: 100%; 112 } 113 114 /* === Section Headers === */ 115 #sweepwidget_wrapper .user_sub_header { 116 width: 100%; 117 margin: 12px 0 4px; 118 padding: 28px 0 12px; 119 font-size: 20px; 120 font-weight: 400; 121 color: #1e1e1e; 122 border-top: 1px solid #e8e8e8; 123 border-bottom: 1px solid #e8e8e8; 124 float: left; 125 } 126 127 #sweepwidget_wrapper .user_sub_header .sw-count { 128 color: #4a3aff; 129 font-weight: 700; 130 } 131 132 /* === Giveaway Cards === */ 133 #sweepwidget_wrapper .user_competitions_each_holder { 134 width: 100%; 135 margin: 0; 136 padding: 20px 0; 137 border-bottom: 1px solid #eee; 138 box-shadow: none; 139 border-radius: 0; 140 float: left; 141 } 142 143 #sweepwidget_wrapper .user_competitions_each_holder:last-of-type { 144 border-bottom: none; 145 } 146 147 #sweepwidget_wrapper .user_competitions_each_holder_inner { 148 width: 100%; 149 padding: 0; 150 display: flex; 151 align-items: flex-start; 152 } 153 154 #sweepwidget_wrapper .user_competitions_each_holder_l { 155 width: 110px; 156 min-width: 110px; 157 margin-right: 20px; 158 margin-bottom: 0; 159 } 160 161 #sweepwidget_wrapper .user_competitions_each_holder_l img { 162 width: 110px; 163 height: 110px; 164 max-width: none; 165 object-fit: cover; 166 border-radius: 8px; 167 border: 1px solid #eee; 168 } 169 170 #sweepwidget_wrapper .sw-placeholder-img { 171 width: 110px; 172 height: 110px; 173 background: #f4f4f5; 174 border: 1px solid #eee; 175 border-radius: 8px; 176 display: flex; 177 align-items: center; 178 justify-content: center; 179 } 180 181 #sweepwidget_wrapper .user_competitions_each_holder_r { 182 flex: 1; 183 min-width: 0; 184 width: auto; 185 } 186 187 /* Card Title */ 188 #sweepwidget_wrapper .user_competitions_each_header { 189 width: 100%; 190 padding: 0 0 6px; 191 font-size: 17px; 192 font-weight: 600; 193 color: #1e1e1e; 194 line-height: 1.3; 195 float: left; 196 } 197 198 /* === Action Buttons === */ 199 #sweepwidget_wrapper .user_competitions_each_links { 200 width: 100%; 201 margin: 2px 0 8px; 202 display: flex; 203 flex-wrap: wrap; 204 gap: 6px; 205 float: left; 206 } 207 208 #sweepwidget_wrapper .user_competitions_each_links a { 209 margin: 0; 210 padding: 5px 14px !important; 211 font-size: 13px !important; 212 font-weight: 500; 213 text-decoration: none !important; 214 border-radius: 6px !important; 215 transition: all 0.15s ease; 216 float: none; 217 display: inline-flex; 218 align-items: center; 219 line-height: 1.4; 220 cursor: pointer; 221 } 222 223 /* Primary action button */ 224 #sweepwidget_wrapper .user_competitions_each_links a.sw-btn-primary { 225 background: #4a3aff !important; 226 color: #fff !important; 227 border: 1.5px solid #4a3aff !important; 228 } 229 230 #sweepwidget_wrapper .user_competitions_each_links a.sw-btn-primary:hover { 231 background: #3d2ee6 !important; 232 border-color: #3d2ee6 !important; 233 color: #fff !important; 234 } 235 236 /* Outlined action button */ 237 #sweepwidget_wrapper .user_competitions_each_links a.sw-btn-outline { 238 background: #fff !important; 239 color: #444 !important; 240 border: 1.5px solid #ccc !important; 241 } 242 243 #sweepwidget_wrapper .user_competitions_each_links a.sw-btn-outline:hover { 244 border-color: #4a3aff !important; 245 color: #4a3aff !important; 246 background: #fff !important; 247 } 248 249 /* === Utility Links === */ 250 #sweepwidget_wrapper .sw-utility-links { 251 width: 100%; 252 display: flex; 253 flex-direction: column; 254 gap: 4px; 255 float: left; 256 } 257 258 #sweepwidget_wrapper .get_embed_code { 259 width: 100%; 260 margin: 0; 261 color: #4a3aff; 262 font-size: 13px; 263 cursor: pointer; 264 text-decoration: none; 265 float: left; 266 } 267 268 #sweepwidget_wrapper .get_embed_code:hover { 269 text-decoration: underline; 270 color: #3d2ee6; 271 } 272 273 #sweepwidget_wrapper .sw-utility-links a.get_embed_code { 274 color: #4a3aff; 275 font-size: 13px; 276 font-weight: 400; 277 text-decoration: none; 278 cursor: pointer; 279 } 280 281 #sweepwidget_wrapper .sw-utility-links a.get_embed_code:hover { 282 text-decoration: underline; 283 color: #3d2ee6; 284 } 285 286 #sweepwidget_wrapper .sw-more-toggle { 287 color: #888; 288 font-size: 12px; 289 cursor: pointer; 290 user-select: none; 291 } 292 293 #sweepwidget_wrapper .sw-more-toggle:hover { 294 color: #4a3aff; 295 } 296 297 #sweepwidget_wrapper .sw-more-content { 298 display: none; 299 flex-direction: column; 300 gap: 4px; 301 } 302 303 #sweepwidget_wrapper .sw-more-content.sw-open { 304 display: flex; 305 } 306 307 #sweepwidget_wrapper .sw-pause-link { 308 margin-top: 4px; 309 color: #c0392b; 310 } 311 312 #sweepwidget_wrapper .sw-pause-link:hover { 313 color: #a93226; 314 } 315 316 /* === Shortcode Textarea === */ 317 #sweepwidget_wrapper .user_competitions_each_textarea { 318 width: 100%; 319 max-width: 420px; 320 height: auto; 321 margin: 8px 0 0; 322 padding: 9px 12px; 323 color: #444; 324 font-size: 12px; 325 font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; 326 line-height: 18px; 327 background: #f8f9fa; 328 border: 1px solid #ddd; 329 border-radius: 6px; 330 outline: none; 331 box-sizing: border-box; 332 display: none; 333 float: left; 334 } 335 336 #sweepwidget_wrapper .user_competitions_each_textarea:focus { 337 border-color: #4a3aff; 338 box-shadow: 0 0 0 2px rgba(74, 58, 255, 0.1); 339 } 340 341 #sweepwidget_wrapper .user_competitions_each_textarea_message { 342 width: 100%; 343 margin: 8px 0; 344 color: #666; 345 font-size: 13px; 346 line-height: 20px; 347 float: left; 348 display: none; 349 } 350 351 #sweepwidget_wrapper .user_competitions_each_textarea_message a { 352 color: #4a3aff; 353 font-weight: 500; 354 } 355 356 #sweepwidget_wrapper .user_competitions_each_textarea_message a:hover { 357 color: #3d2ee6; 358 } 359 360 /* === Getting Started Links === */ 361 #sweepwidget_wrapper .user_account_getting_started_links_wrapper { 362 width: 100%; 363 margin: 28px 0 0; 364 padding: 20px 0 8px; 365 text-align: center; 366 border-top: 1px solid #eee; 367 float: left; 368 } 369 370 #sweepwidget_wrapper .user_account_getting_started_link { 371 width: 30%; 372 margin: 0 1.5% 12px; 373 text-align: center; 374 font-weight: 500; 375 float: left; 376 } 377 378 #sweepwidget_wrapper .user_account_getting_started_link a { 379 color: #4a3aff; 380 font-size: 13px; 381 text-decoration: none; 382 } 383 384 #sweepwidget_wrapper .user_account_getting_started_link a:hover { 385 text-decoration: underline; 386 color: #3d2ee6; 387 } 388 389 /* === Launchpad === */ 390 #sweepwidget_wrapper #user_examples_wrapper { 391 width: 100%; 392 margin: 20px 0; 393 padding: 20px 24px; 394 background: #f8f9fa; 395 border: 1px solid #eee; 396 border-radius: 10px; 397 text-align: center; 398 box-sizing: border-box; 399 box-shadow: none; 400 float: left; 401 } 402 403 #sweepwidget_wrapper .sw-launchpad-heading { 404 width: 100%; 405 margin: 4px 0 16px; 406 font-size: 16px; 407 font-weight: 600; 408 color: #1e1e1e; 409 text-align: center; 410 float: left; 411 } 412 413 #sweepwidget_wrapper .user_examples_link_holder { 414 margin: 0 5px 6px 0; 415 text-align: center; 416 float: left; 417 } 418 419 #sweepwidget_wrapper .user_examples_link_holder a { 420 padding: 6px 12px; 421 font-size: 12px; 422 font-weight: 500; 423 text-align: center; 424 text-decoration: none; 425 border-radius: 6px; 426 transition: all 0.15s ease; 427 display: inline-block; 428 } 429 430 #sweepwidget_wrapper .user_examples_link_holder a:hover { 431 opacity: 0.85; 432 transform: translateY(-1px); 433 } 434 435 /* === Error messages === */ 436 #sweepwidget_wrapper .sw-error-message { 437 padding: 20px; 438 text-align: center; 439 color: #999; 258 440 font-size: 14px; 259 cursor: pointer; 260 float: left; 261 } 262 263 .get_embed_code a { 264 margin: 0; 265 color: #33adff; 266 font-size: 14px; 267 cursor: pointer; 268 float: left; 269 } 270 271 .get_embed_code img { 272 margin-right: 7px; 273 width: 15px; 274 float: left; 275 } 276 277 .user_competitions_each_textarea { 278 width: 94%; 279 height: 90px; 280 margin: 15px 0 0px 0; 281 padding: 10px 3% 10px 3%; 282 color: #999; 283 font-size: 14px; 284 line-height: 22px; 285 border: 2px solid #f8f8f8; 286 outline: none; 287 border-radius: 10px; 288 -webkit-border-radius: 10px; 289 -moz-border-radius: 10px; 290 -o-border-radius: 10px; 291 float: left; 292 display: none; 293 } 294 295 .user_competitions_each_textarea_message { 296 width: 100%; 297 margin: 10px 0 15px 0; 298 color: #777; 299 font-size: 14px; 300 line-height: 22px; 301 float: left; 302 display: none; 303 } 304 305 .user_examples_link_holder { 306 margin:0 10px 10px 0; 307 text-align:center; 308 float:left; 309 } 310 311 #user_examples_wrapper { 312 width:84%; 313 margin:20px 8% 25px 8%; 314 padding:5px 30px 20px 30px; 315 text-align:center; 316 float:left; 317 } 318 319 .user_examples_link_holder a { 320 padding:9px 16px; 321 margin:auto; 322 font-size:16px; 323 text-align:center; 324 text-decoration:none; 325 border-radius:30px; 326 display:inline-block; 327 } 328 329 .user_account_getting_started_link { 330 font-weight:bold; 331 } 332 333 .entry_methods_box_holder, .entry_methods_box_holder_3 { 334 width: 100%; 335 margin: 0 0 10px 0; 336 text-align:left; 337 float: left; 338 } 339 340 .entry_methods_box_holder_3 { 341 width: 100%; 342 padding: 20px; 343 background:#fff; 344 border-radius:10px; 345 -webkit-border-radius:10px; 346 -moz-border-radius:10px; 347 -o-border-radius:10px; 348 -webkit-box-shadow: 0px 0px 13px 0px rgb(215, 215, 215); 349 -moz-box-shadow: 0px 0px 13px 0px rgba(215, 215, 215); 350 box-shadow: 0px 0px 13px 0px rgba(215, 215, 215); 351 -moz-box-sizing: border-box; 352 -webkit-box-sizing: border-box; 353 -ms-box-sizing: border-box; 354 box-sizing: border-box; 355 } 356 357 .entry_methods_box_holder_header { 358 margin: 0 0 15px 0; 359 color: #444; 360 font-weight: bold; 361 } 362 363 .entry_methods_box_holder_header_h2 { 364 margin: 0 0 30px 0; 365 color: #444; 366 font-weight: bold; 367 } 368 369 .entry_methods_box_holder_2 { 370 width: 100%; 371 padding: 15px 20px 20px 20px; 372 background: #fff; 373 border-radius: 8px; 374 -webkit-border-radius: 8px; 375 -moz-border-radius: 8px; 376 -o-border-radius: 8px; 377 -webkit-box-shadow: 0px 0px 13px 0px rgb(215, 215, 215); 378 -moz-box-shadow: 0px 0px 13px 0px rgba(215, 215, 215); 379 box-shadow: 0px 0px 13px 0px rgba(215, 215, 215); 380 -moz-box-sizing: border-box; 381 -webkit-box-sizing: border-box; 382 -ms-box-sizing: border-box; 383 box-sizing: border-box; 384 float: left; 385 } 386 387 .entry_methods_box_holder_header_desc { 388 width: 100%; 389 margin: 0 0 15px 0; 390 color: #999; 391 font-size: 15px; 392 font-style: normal; 393 float: left; 394 } 395 396 .entry_methods_box_holder_header_2 { 397 width: 100%; 398 margin: 10px 0 15px 0; 399 color: #444; 400 font-size: 15px; 401 font-style: normal; 402 float: left; 403 } 404 405 .entry_method_body_inner, .unlock_rewards_body_inner { 406 width: 100%; 407 margin: 0px 0 0 0; 408 background:#f6f6f6; 409 border-radius:0 0 10px 10px; 410 float: left; 411 } 412 413 .verification_radio_buttons { 414 width: 100%; 415 margin: 0px 0 0 0; 416 font-size:15px; 417 font-style:normal; 418 float: left; 419 } 420 421 @media screen and (min-width: 801px) { 422 423 .entry_methods_box_holder { 424 width: 100%; 425 padding: 0; 426 } 427 428 } 429 430 .user_account_getting_started_links_wrapper { 431 width:100%; 432 margin:20px 0 0px 0; 433 padding:30px 0 10px 0; 434 text-align:center; 435 float:left; 436 } 437 438 .user_account_getting_started_link { 439 width:30%; 440 margin:0px 1.5% 20px 1.5%; 441 text-align:center; 442 float:left; 443 } 444 445 .user_account_getting_started_link a { 446 font-size:17px; 447 } 448 449 .user_account_getting_started_link_line { 450 padding-bottom:3px; 451 border-bottom:2px solid; 452 } 453 454 @media only screen and (max-width:1280px) { 455 456 .user_account_getting_started_links_wrapper { 457 margin:20px 0 -10px 0; 458 padding:0px 0 40px 0; 459 } 460 461 .user_account_getting_started_link { 462 width:100%; 463 margin:30px 0 0 0; 464 text-align:center; 465 float:left; 466 } 467 468 } 441 } 442 443 /* === Responsive === */ 444 @media only screen and (max-width: 1000px) { 445 #sweepwidget_wrapper .user_competitions_each_holder { 446 width: 100%; 447 margin: 0; 448 } 449 } 450 451 @media only screen and (max-width: 700px) { 452 #sweepwidget_wrapper_inner { 453 padding: 16px; 454 } 455 456 #sweepwidget_wrapper .user_competitions_each_holder_inner { 457 flex-direction: column; 458 } 459 460 #sweepwidget_wrapper .user_competitions_each_holder_l { 461 width: 100%; 462 margin: 0 0 12px; 463 } 464 465 #sweepwidget_wrapper .user_competitions_each_holder_l img { 466 width: 80px; 467 height: 80px; 468 } 469 470 #sweepwidget_wrapper .user_competitions_each_holder_r { 471 width: 100%; 472 } 473 474 #sweepwidget_wrapper .user_account_getting_started_link { 475 width: 100%; 476 margin: 0 0 10px; 477 } 478 479 #sweepwidget_wrapper #sweepwidget_nav_holder, 480 #sweepwidget_wrapper #sweepwidget_nav_holder_2 { 481 text-align: center; 482 } 483 484 #sweepwidget_wrapper .user_sub_header { 485 text-align: center; 486 } 487 } -
sweepwidget/trunk/readme.txt
r3123387 r3458603 4 4 Requires at least: 3.0.1 5 5 Requires PHP: 7.0 6 Tested up to: 6. 67 Stable tag: 2.0. 66 Tested up to: 6.7 7 Stable tag: 2.0.7 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 10 11 The best free WordPress contest tool to run viral giveaways, sweepstakes, photo contests, video contests, voting competitions, raffles, leaderboard competitions, & instant prize draws.11 The best free WordPress contest tool to run viral giveaways, sweepstakes, photo contests, video contests, voting competitions, raffles, leaderboard competitions, instant prize draws, & instant coupons. 12 12 13 13 == Description == 14 14 15 SweepWidget is the best free WordPress contest tool to run viral giveaways, sweepstakes, photo contests, video contests, voting competitions, raffles, instant prize draws, instant coupon campaigns, leaderboard competitions, & many other types of promotions. SweepWidget makes it easy to increase your social followers, email subscribers, website traffic, social engagement, leads, and sales. Boost your your followers, shares, likes, email signups, leads, &sales.15 SweepWidget is the best free WordPress contest tool to run viral giveaways, sweepstakes, photo contests, video contests, voting competitions, raffles, instant prize draws, instant coupon campaigns, leaderboard competitions, and many other types of promotions. SweepWidget makes it easy to increase your social followers, email subscribers, website traffic, social engagement, leads, and sales. 16 16 17 17 = Why use SweepWidget? = 18 18 19 * Over 90+ entry methods to choose from (more than any other WordPress plugin contest tool). 19 * Over 130+ entry methods to choose from (more than any other WordPress plugin contest tool). 20 * 30+ social media platform integrations with API-verified entries. 20 21 * Run an online contest or giveaway on any website. Embed the widget directly into [your WordPress site](https://sweepwidget.com/docs/how-to-embed-a-sweepwidget-giveaway-into-your-wordpress-site) or use a free [hosted landing page](https://sweepwidget.com/docs/how-to-setup-a-hosted-landing-page-for-your-giveaway). 21 * Easily embed your contest into your WordPress blog with a single 1-line short code.22 * Manage all of your giveaway from within your WordPress admin dashboard.22 * Easily embed your contest into your WordPress blog with a single 1-line shortcode. 23 * Manage all of your giveaways from within your WordPress admin dashboard. 23 24 * Collect unlimited emails for free. Grow your email list and export data to a CSV file. 24 * Run Instagram contests, Facebook contests, You tube contests, Twitter contests, Pinterest contests, TikTok contests and over 30+ more social media platforms.25 * Run Instagram contests, Facebook contests, YouTube contests, Twitter / X contests, Pinterest contests, TikTok contests, Threads contests, Discord contests, and more. 25 26 * Let users win [instant prizes](https://sweepwidget.com/examples/unlock-rewards) & [instant coupons](https://sweepwidget.com/examples/instant-coupons). 26 * Viral share contests and refer a friend contests .27 * Run purchase-based contests to reward entries based on spend $1 spent = 1 entry. WooCommerce integration to automatically track sales and reward users based from making purchases.28 * Run photo or video contests with voting or panel judging.29 * Create a [leaderboard competition](https://sweepwidget.com/examples/leaderboard) .30 * Choose from [ 19email API integrations](https://sweepwidget.com/docs/sweepwidget-email-api-integrations).27 * Viral share contests and refer a friend contests with unique referral links. 28 * Run purchase-based contests to reward entries based on spend ($1 spent = 1 entry). Shopify and WooCommerce integrations to automatically track sales and reward users. 29 * Run photo or video contests with public voting, admin judging, gallery display, and submission moderation. 30 * Create a [leaderboard competition](https://sweepwidget.com/examples/leaderboard) with real-time rankings and milestone rewards. 31 * Choose from [21+ email API integrations](https://sweepwidget.com/docs/sweepwidget-email-api-integrations). 31 32 * [Support for 103 languages](https://sweepwidget.com/docs/sweepwidget-multi-language-support). 32 * [Custom design & CSS](https://sweepwidget.com/docs/category/giveaways/style-design) .33 * [Zapier integration](https://sweepwidget.com/docs/sweepwidget-zapier-integration) .34 * [API Access](https://sweepwidget.com/docs/sweepwidget-api) .33 * [Custom design & CSS](https://sweepwidget.com/docs/category/giveaways/style-design) with 900+ Google Fonts. 34 * [Zapier integration](https://sweepwidget.com/docs/sweepwidget-zapier-integration) to connect with 5,000+ apps. 35 * [API Access](https://sweepwidget.com/docs/sweepwidget-api) with full REST API. 35 36 * [Accept Payments](https://sweepwidget.com/docs/accept-payments-for-your-sweepwidget-contest). Collect donations, payments, fundraising, sell products, and more. 36 * [Custom SMTP](https://sweepwidget.com/docs/add-custom-smtp-to-your-sweepwidget-emails) .37 * [Custom SMTP](https://sweepwidget.com/docs/add-custom-smtp-to-your-sweepwidget-emails) for white-label email delivery. 37 38 * Run a viral giveaway, sweepstakes (big or small), skill contest, leaderboard competition, instant rewards, quizzes, surveys, instant coupons (unique codes or unlimited), tiered milestones, and so much more. 38 39 39 40 = Entry methods = 40 41 42 **Twitter / X** 43 44 * [Twitter / X giveaway](https://sweepwidget.com/examples/twitter) to grow your Twitter / X page. 45 * [Twitter / X contest](https://sweepwidget.com/examples/twitter) to get more followers, tweets, retweets, and visits. API-verified entries. 46 47 **Facebook** 48 41 49 * [Facebook giveaway](https://sweepwidget.com/examples/facebook) to grow your Facebook page. 42 * [Facebook contest](https://sweepwidget.com/examples/facebook) to get more Facebook likes, comments, shares, and visits. 43 * [Twitter giveaway](https://sweepwidget.com/examples/twitter) to grow your Twitter page. 44 * [Twitter contest](https://sweepwidget.com/examples/twitter) to get more Twitter followers, tweets, retweets, and visits. 50 * [Facebook contest](https://sweepwidget.com/examples/facebook) to get more Facebook likes, comments, shares, group joins, and visits. 51 52 **Instagram** 53 45 54 * [Instagram giveaway](https://sweepwidget.com/examples/instagram) to grow your Instagram page. 46 * [Instagram contest](https://sweepwidget.com/examples/instagram) to get more Instagram followers, likes, reposts, and visits. 55 * [Instagram contest](https://sweepwidget.com/examples/instagram) to get more Instagram followers, likes, comments, reposts, tags, and visits. API-verified entries. 56 57 **YouTube** 58 59 * [YouTube giveaway](https://sweepwidget.com/examples/youtube) to grow your YouTube channel. 60 * [YouTube contest](https://sweepwidget.com/examples/youtube) to get more YouTube subscribers, comments, likes, video views, and visits. API-verified entries. 61 62 **TikTok** 63 64 * [TikTok giveaway](https://sweepwidget.com/examples/tiktok) to grow your TikTok page. 65 * [TikTok contest](https://sweepwidget.com/examples/tiktok) to get more TikTok followers, liked videos, views, comments, shares, and visits. 66 67 **Threads** 68 69 * Threads contest to get more Threads followers, reposts, and comments. 70 71 **Pinterest** 72 47 73 * [Pinterest giveaway](https://sweepwidget.com/examples/pinterest) to grow your Pinterest page. 48 * [Pinterest contest](https://sweepwidget.com/examples/pinterest) to get more Pinterest followers, repins, and visitors. 49 * [Youtube giveaway](https://sweepwidget.com/examples/youtube) to grow your Youtube channel. 50 * [Youtube contest](https://sweepwidget.com/examples/youtube) to get more Youtube subscribers, comments, likes, video views, and visits. 74 * [Pinterest contest](https://sweepwidget.com/examples/pinterest) to get more Pinterest followers, repins, board follows, and visitors. 75 76 **LinkedIn** 77 78 * [LinkedIn giveaway](https://sweepwidget.com/examples/linkedin) to grow your LinkedIn profile. 79 * [LinkedIn contest](https://sweepwidget.com/examples/linkedin) to get more LinkedIn followers and shares. 80 81 **Discord** 82 83 * Discord contest to grow your Discord server. API-verified join confirmation. 84 85 **Twitch** 86 87 * [Twitch giveaway](https://sweepwidget.com/examples/twitch) to grow your Twitch channel. 88 * [Twitch contest](https://sweepwidget.com/examples/twitch) to get more Twitch followers and subscriptions. API-verified entries. 89 90 **Telegram** 91 92 * [Telegram giveaway](https://sweepwidget.com/examples/telegram) to grow your Telegram channel or group. 93 * [Telegram contest](https://sweepwidget.com/examples/telegram) to get more Telegram followers and comments. API-verified via bot webhook. 94 95 **Reddit** 96 97 * [Reddit giveaway](https://sweepwidget.com/examples/reddit) to grow your Reddit community. 98 * Reddit contest to get more subreddit subscribers and comments. API-verified entries. 99 100 **Spotify** 101 102 * [Spotify giveaway](https://sweepwidget.com/examples/spotify) to grow your Spotify channel. 103 * [Spotify contest](https://sweepwidget.com/examples/spotify) to get more Spotify followers, playlist follows, and song listens. API-verified entries. 104 105 **SoundCloud** 106 107 * [SoundCloud giveaway](https://sweepwidget.com/examples/soundcloud) to grow your SoundCloud page. 108 * [SoundCloud contest](https://sweepwidget.com/examples/soundcloud) to get more SoundCloud followers, song likes, reposts, and listens. 109 110 **Medium** 111 112 * Medium contest to get more claps and comments on your articles. 113 114 **Other Platforms** 115 116 * [Snapchat giveaway](https://sweepwidget.com/examples/snapchat) to grow your Snapchat profile and get more followers. 117 * [Tumblr giveaway](https://sweepwidget.com/examples/tumblr) to grow your Tumblr page and get more followers and liked posts. 118 * [Etsy giveaway](https://sweepwidget.com/examples/etsy) to grow your Etsy shop, get more followers, likes, and sales. 119 * [eBay giveaway](https://sweepwidget.com/examples/ebay) to grow your eBay shop and increase sales. 120 * [Steam giveaway](https://sweepwidget.com/examples/steam) to get more Steam group members. 121 * [Patreon giveaway](https://sweepwidget.com/examples/patreon) to grow your Patreon page and get more donations. 122 * [Eventbrite giveaway](https://sweepwidget.com/examples/eventbrite) to get more event attendees. 123 * [Bloglovin' giveaway](https://sweepwidget.com/examples/bloglovin) to increase your Bloglovin' followers. 124 125 **Custom & Miscellaneous Entry Methods** 126 127 * [Visit a page giveaway](https://sweepwidget.com/examples/visit-a-page) to increase website traffic with a contest. 128 * [Subscribe to newsletter giveaway](https://sweepwidget.com/examples/email-subscription) to increase your email leads and signups. We have 21+ CRM email provider API integrations. 51 129 * [RSS giveaway](https://sweepwidget.com/examples/rss) to grow your RSS followers. 52 * [Visit a page giveaway](https://sweepwidget.com/examples/visit-a-page) to increase website traffic with a contest.53 * [Bonus giveaway](https://sweepwidget.com/examples/bonus-entries) to collect bonus entries.54 130 * [Blog comment giveaway](https://sweepwidget.com/examples/blog-comment) to increase blog comments on your website. 55 * [ Subscribe to newsletter giveaway](https://sweepwidget.com/examples/email-subscription) to increase your email leads and signups. We have 19 CRM email provider API integrations.131 * [Disqus comment giveaway](https://sweepwidget.com/examples/blog-comment) to get more Disqus comments. 56 132 * [Custom user fields giveaway](https://sweepwidget.com/examples/user-information) to collect user data and increase leads, sales, and signups. 57 133 * [Create poll / survey giveaway](https://sweepwidget.com/examples/ask-a-question) to create custom quizzes, surveys, polls, and more. 58 134 * [App download giveaway](https://sweepwidget.com/examples/app-download) to increase your app downloads. 59 * [Linkedin giveaway](https://sweepwidget.com/examples/linkedin) to grow your Linkedin profile. 60 * [Linkedin contest](https://sweepwidget.com/examples/linkedin) to get more Linkedin followers and shares. 61 * [Etsy giveaway](https://sweepwidget.com/examples/etsy) to grow your Etsy shop. 62 * [Etsy contest](https://sweepwidget.com/examples/etsy) to get more Etsy followers, likes, and sales. 63 * [eBay giveaway](https://sweepwidget.com/examples/ebay) to grow your eBay shop. 64 * [eBay contest](https://sweepwidget.com/examples/ebay) to increase eBay sales and get more followers. 65 * [Tumblr giveaway](https://sweepwidget.com/examples/tumblr) to grow your Tumblr page. 66 * [Tumblr contest](https://sweepwidget.com/examples/tumblr) to get more Tumblr followers and liked posts. 67 * [Reddit giveaway](https://sweepwidget.com/examples/reddit) to grow your Reddit subchannel. 68 * [Telegram giveaway](https://sweepwidget.com/examples/telegram) to grow your Telegram channel. 69 * [Telegram contest](https://sweepwidget.com/examples/telegram) to get more Telegram followers. 70 * [TikTok giveaway](https://sweepwidget.com/examples/tiktok) to grow your TikTok page. 71 * [TikTok contest](https://sweepwidget.com/examples/tiktok) to get more TikTok followers, increase your liked videos, get more views, comments, shares, and visits. 72 * [Twitch TV giveaway](https://sweepwidget.com/examples/twitch) to grow your Twitch channel. 73 * [Twitch TV contest](https://sweepwidget.com/examples/twitch) to get more Twitch followers and subscriptions. 74 * [Eventbrite giveaway](https://sweepwidget.com/examples/eventbrite) to get more attendies. 75 * [Bloglovin' giveaway](https://sweepwidget.com/examples/bloglovin) to increase your Bloglovin' followers. 76 * [FeedBurner giveaway](https://sweepwidget.com/examples/feedburner) to get more subscriptions. 77 * [FeedPress giveaway](https://sweepwidget.com/examples/email-subscription) to get more subscriptions. 78 * [Disqus comment giveaway](https://sweepwidget.com/examples/blog-comment) to get more Disqus comments. 79 * [Soundcloud giveaway](https://sweepwidget.com/examples/soundcloud) to grow your Soundcloud page. 80 * [Soundcloud contest](https://sweepwidget.com/examples/soundcloud) to get more Soundcloud followers, song likes, shared songs, and listens. 81 * [Snapchat giveaway](https://sweepwidget.com/examples/snapchat) to grow your Snapchat profile. 82 * [Snapchat contest](https://sweepwidget.com/examples/snapchat) to get more Snapchat followers. 83 * [Spotify giveaway](https://sweepwidget.com/examples/spotify) to grow your Spotify channel. 84 * [Spotify contest](https://sweepwidget.com/examples/spotify) to get more Spotify followers, song likes, shared songs, and listens. 85 * [Mixer giveaway](https://sweepwidget.com/examples/mixer) to grow your Mixer page. 86 * [Myspace giveaway](https://sweepwidget.com/examples/myspace) to grow your Myspace page. 87 * [Steam giveaway](https://sweepwidget.com/examples/steam) to get more Steam followers. 88 * [Patreon giveaway](https://sweepwidget.com/examples/patreon) to grow your Patreon page and get more donations. 89 * [Upload a file giveaway](https://sweepwidget.com/examples/upload-a-file) to get user photos. 135 * [Upload a file giveaway](https://sweepwidget.com/examples/upload-a-file) to get user photos, videos, and files. 136 * [Bonus giveaway](https://sweepwidget.com/examples/bonus-entries) to collect bonus entries. 137 * [Refer friends giveaway](https://sweepwidget.com/examples/refer-friends) for viral sharing and refer-a-friend contests. 90 138 * [Create your own entry method giveaway](https://sweepwidget.com/examples/create-your-own-entry) to make any type of contest you want! 139 * Enter a secret code to unlock entries. 140 * Leave a review entry method. 141 * FeedBurner and FeedPress subscriptions. 142 143 **Custom Form Fields** 144 145 * Text input, select dropdown, radio buttons, textarea, checkboxes, birthday, full name, address, phone number (with international country codes), and e-signature capture. 146 147 **Crypto Wallet Entry Methods** 148 149 * Collect BTC, ETH / BEP-20, BEP-2, Solana, and other crypto wallet addresses. 150 151 **E-Commerce Entry Methods** 152 153 * Shopify purchase entries — earn entries for every $1 spent (API-verified). 154 * WooCommerce purchase entries — earn entries for every $1 spent. 155 * Manual purchase verification entries. 156 157 = Competition types = 158 159 * **Sweepstakes / Giveaway** — Random winner selection with entry weighting. 160 * **Photo / Video Contest** — Users upload photos or videos. Winners chosen by public voting or admin judging. Gallery display with thumbnail grid, vote counts, and submission moderation. 161 * **Leaderboard Competition** — Real-time ranking by points/entries earned. Configurable display showing up to 500 people with privacy name formats. 162 * **Instant Win / Instant Prizes** — Users win prizes instantly when reaching entry thresholds. 163 * **Instant Coupon Distribution** — Automatic unique coupon code delivery when milestones are reached. 164 * **Milestone Rewards** — Unlock rewards at specific entry count thresholds with progress tracking. 165 166 = Winner selection = 167 168 * [Randomly generate winners](https://sweepwidget.com/docs/randomly-pick-a-winner) — Select number of winners, filter by entry count, weighted by entries. 169 * [Manually pick winners](https://sweepwidget.com/docs/how-to-manually-pick-a-winner) — Select winners via checkboxes and allocate specific prizes. 170 * **Live Draw** — Full-screen winner announcement interface for streaming and events. Confetti animation, prize display, "Pick Another Winner" functionality. 171 * **Redemption codes** — Assign unique redemption codes to prizes with individual claim pages and double-redemption protection. 172 * **Winner emails** — Custom email subject and body with merge tags ([FIRST_NAME], [LAST_NAME], [REDEMPTION_CODE_CLAIM_LINK], etc.). 91 173 92 174 = Email API integrations = 93 175 94 [We offer the following email API integrations](https://sweepwidget.com/docs/sweepwidget-email-api-integrations): 95 96 * MailChimp contest 97 * Aweber contest 98 * Active Campaign contest 99 * Mad Mimi contest 100 * Constant Contact contest 101 * MailerLite contest 102 * ConvertKit contest 103 * HubSpot contest 104 * Campaign Monitor contest 105 * GetResponse contest 106 * Drip contest 107 * SendGrid contest 108 * Klaviyo contest 109 * Iterable contest 110 * SendFox contest 111 * Pabbly contest 112 * Sendy contest 113 * EmailOctopus contest 114 * Omnisend contest 176 [We offer 21+ email API integrations](https://sweepwidget.com/docs/sweepwidget-email-api-integrations): 177 178 * Mailchimp 179 * AWeber 180 * ActiveCampaign 181 * Constant Contact 182 * ConvertKit 183 * MailerLite 184 * SendFox 185 * Campaign Monitor 186 * GetResponse 187 * Drip 188 * Klaviyo 189 * Iterable 190 * SendGrid 191 * Pabbly 192 * HubSpot 193 * Sendy 194 * EmailOctopus 195 * Omnisend 196 * MailJet 197 * Mad Mimi 198 * Braze 199 200 = Social login = 201 202 Users can log into giveaways via 9+ social accounts: Facebook, X (Twitter), Google, LinkedIn, Twitch, Discord, Steam, Tumblr, Telegram, Reddit, Pinterest, and Spotify. 203 204 = Design & customization = 205 206 * **Color customization** — Container, body, title, buttons, inputs, links, landing page background. 207 * **900+ Google Fonts** plus system fonts with configurable sizes for body, title, buttons, and more. 208 * **Layout options** — Widget max width (300px to 1,200px), left/center/right alignment, border shadow toggle. 209 * **8 image display formats** — Full width, small left/right/above/below, medium above/below, custom dimensions. 210 * **YouTube video embed** as featured media. 211 * **Custom logo upload** with optional clickable link. 212 * **Custom CSS editor** with CodeMirror syntax highlighting for complete control over widget appearance. 213 * **Widget popup / modal mode** — Convert embedded widget into a modal popup with configurable delay timer. 214 * **2,000+ custom entry icons** — Icon library for entry methods. 215 * [Custom icon colors](https://sweepwidget.com/docs/custom-entry-icon-colors). 216 * [Remove branding](https://sweepwidget.com/docs/white-labeling-remove-sweepwidget-branding) / white-labeling. 217 * Hide giveaway title, description, separator lines, "My Entries" count, or "Total Entries" count. 218 * Circle or square entry method icon styles. 219 220 = Landing pages & embedding = 221 222 * **Free hosted landing pages** on sweepwidget.com/c/your-giveaway with automatic Open Graph and Twitter Card meta tags. 223 * **Custom URL slugs** — Use your own branded URL path. 224 * **QR code generation** — SVG format QR codes linking to your hosted landing page. 225 * **WordPress shortcode** — Embed with a single line: [sweepwidget id="123" url="your-giveaway"]. 226 * **JavaScript embed** — Embed on any website with a simple div and script tag. 227 * **Shopify quick-embed** — One-click page creation via Shopify API. 228 * **Pre-fill & auto-login** — Pre-fill email and name from email campaigns for seamless entry. 229 * **Giveaway directory** — Public browsable directory of active giveaways at sweepwidget.com/enter-giveaways. 230 231 = Security & anti-fraud = 232 233 * **4 security levels** — Weak, Standard, Strong, and Strict with escalating device fingerprinting. 234 * **IP protections** — Duplicate IP blocking, max emails per IP limits, global IP blacklist/whitelist, per-competition IP lists. 235 * **Disposable email blocking** — 4,940+ blocked disposable email domains with email quality analysis and risk scoring. 236 * **VPN & proxy detection** — 3 detection services (IPQS Device Fingerprint, IPQS IP API, ProxyCheck.io) to block VPN, proxy, and Tor users. 237 * **Behavioral anti-bot detection** — Sec-Fetch header validation, JavaScript SHA-256 challenge, automation detection (Selenium, Playwright, Puppeteer), keyboard timing analysis, combined behavioral risk scoring. 238 * **Rate limiting** — Per-competition and global rate limits with Redis-based tracking and temporary IP bans. 239 * **Country restrictions** — [Geo-location filtering](https://sweepwidget.com/docs/geo-targeting-restrict-users-by-country) by country with CloudFlare detection. 240 * **Age verification** — Minimum or maximum age requirement (1-99 years) with date format options. 241 * **Email verification (2FA)** — 4-digit verification code sent via email. 242 * **SMS verification** — Via Twilio integration with international phone support (Enterprise). 243 * **Max people / entries limits** — Cap total entrants or total entries. 244 * **Honeypot fields** — Hidden fields that catch bots. 245 * [Require Google reCAPTCHA](https://sweepwidget.com/docs/require-captcha). 246 * **Whitelisted emails only** — Restrict entry to pre-approved email list. 247 * **Referral fraud prevention** — Self-referral detection and velocity limits. 248 249 = Analytics & tracking = 250 251 * **Built-in analytics dashboard** — Total views, unique views, users entered, actions, entries, conversion rate. Daily trend charts, entry method performance breakdown, device distribution, geography (top 10 countries), conversion funnel chart, top referrer domains. 252 * **Export analytics** to CSV, JSON, or Text. 253 * **Google Analytics 4 (GA4)** — Tracked events: page_view, SweepWidget login, insert entry, enter giveaway, reload widget. 254 * **Google Tag Manager** — DataLayer events: sw_page_view, sw_user_login, sw_contest_entry, sw_insert_entry, sw_reload_widget. 255 * **Facebook / Meta Pixel** — Tracked events: PageView, ViewContent, Lead, CompleteRegistration. 256 * **TikTok Pixel** — Tracked events: PageView, ViewContent, SubmitForm, CompleteRegistration. 257 258 = Referral & viral sharing = 259 260 * **Unique referral URL** per user for viral sharing. 261 * **Share via** Facebook, Twitter / X, LinkedIn, Email, WhatsApp, SMS, and Copy Link. 262 * **Bonus entries for referrals** — Award extra entries for each successful referral. 263 * **Max referrals limit** — Limit how many friends can be referred. 264 * **Friend entry requirement** — Only credit referrer after friend earns X entries. 265 * **Masked referral links** — Custom username-based referral URLs. 266 * **Custom referral URL** — Send referrals to a specific embedded page. 267 * **Referral fraud protection** — Self-referral detection via IP and browser fingerprint, velocity limits (max 5/hour, 20/day). 268 269 = Team & brand management = 270 271 * **Team members** — Invite team members with role-based permissions (Administrator, Collaborator, Read-only). Up to 5 team members on Enterprise. 272 * **Multi-brand management** — Create multiple brands under one account, each with its own giveaways. Up to 5 paid brands on Enterprise. 273 * **Brand-specific timezone settings**. 274 275 = Reporting & data export = 276 277 * [Export entries to CSV](https://sweepwidget.com/docs/how-to-export-the-email-addresses-from-your-giveaway-in-a-csv-file) — All actions, all users, winners, single entry method, earned coupons, and uploaded files (ZIP archive). 278 * **CSV user import** — Bulk import up to 1,000 entries per file with name, email, date of birth, phone, country, and entry amount. 279 * **Search & filter** — By email/name, verification status, winner status, country, and date range. 280 * [Moderate entries](https://sweepwidget.com/docs/category/giveaways/manage-entries) — Disqualify individual users, bulk disqualify, disqualify all referrals, un-disqualify, and flag specific entries. 281 282 = Confirmation & winner emails = 283 284 * **Confirmation emails** — Default, custom with logo, or custom HTML email. Merge tags: [USERNAME], [EMAIL], [TITLE], [START_DATE], [END_DATE], [VERIFY_EMAIL_CODE], [VIRAL_SHARE_LINK], and more. 285 * **Winner notification emails** — Custom subject and body with merge tags: [FIRST_NAME], [LAST_NAME], [REDEMPTION_CODE_CLAIM_LINK]. 286 * **Custom reply-to email** and logo branding. 287 * **Custom SMTP** — Send from your own domain via SendGrid (Enterprise). 288 289 = Official rules generator = 290 291 * Built-in legal rules template generator with 15 sections covering eligibility, prize details, winner selection, terms, liability, and social media disclaimers. 292 * Customizable fields: company name, address, eligibility requirements, age requirements, prize value, start/end dates, and contact email. 293 294 = Starter templates = 295 296 * Pre-built giveaway configurations for quick start across social media, e-commerce, crypto, engagement, traffic, content, and event categories. 297 * Tag-based filtering and search functionality. 115 298 116 299 = More features = 117 300 118 301 * [Add Terms & conditions](https://sweepwidget.com/docs/add-rules) 119 * [Custom icon colors](https://sweepwidget.com/docs/custom-entry-icon-colors) 120 * [Add a prize image](https://sweepwidget.com/docs/image-display-options) 302 * [Add a prize image](https://sweepwidget.com/docs/image-display-options) or YouTube video embed 121 303 * [Add custom background image to your hosted landing page](https://sweepwidget.com/docs/how-to-add-a-background-image) 122 * [Custom confirmation](https://sweepwidget.com/docs/send-a-confirmation-email-to-users-after-they-enter) / [verification emails](https://sweepwidget.com/docs/require-users-to-verify-their-email-address)123 304 * Create unlimited contests 124 305 * Drag and drop builder 125 * [Export entries to CSV](https://sweepwidget.com/docs/how-to-export-the-email-addresses-from-your-giveaway-in-a-csv-file)126 * [Require Google Captcha](https://sweepwidget.com/docs/require-captcha)127 * Advanced security features128 * Real-time Analytics129 * [Moderate entries](https://sweepwidget.com/docs/category/giveaways/manage-entries)130 * [Randomly generate winners](https://sweepwidget.com/docs/randomly-pick-a-winner)131 * [Manually pick winners](https://sweepwidget.com/docs/how-to-manually-pick-a-winner)132 306 * [Hide "All Entries" Count](https://sweepwidget.com/docs/hide-all-entries) 133 * [URL Redirection](https://sweepwidget.com/docs/redirect-user-upon-completion-of-giveaway) 134 * [Remove branding](https://sweepwidget.com/docs/white-labeling-remove-sweepwidget-branding) 135 * [Restrict users by country](https://sweepwidget.com/docs/geo-targeting-restrict-users-by-country) 136 * [Use custom icons for entry methods](https://sweepwidget.com/docs/add-a-custom-icon-to-an-entry-method) 307 * [URL Redirection](https://sweepwidget.com/docs/redirect-user-upon-completion-of-giveaway) after completion 308 * Daily / repeatable entries — Choose any interval from 1 entry per hour up to every 24 hours 309 * Mandatory / locked entry methods — Require users to complete specific actions before unlocking others 310 * Daisy-chained entries — Require sequential completion of entry methods in order 311 * Entry method grouping and drag-and-drop ordering 312 * Custom entry labels, worth (1-100 entries), and entry timers 313 * Entries vs. Points vs. Custom — Change the "entries" label to anything 314 * [Use custom icons for entry methods](https://sweepwidget.com/docs/add-a-custom-icon-to-an-entry-method) (2,000+ icons available) 315 * Mute / pause giveaways (reversible) or permanently delete 137 316 138 317 == Installation == 139 318 140 1. Upload the folder to the following director:/wp-content/plugins/.319 1. Upload the sweepwidget folder to /wp-content/plugins/. 141 320 2. Activate the SweepWidget plugin through the 'Plugins' menu in WordPress. 142 3. You will now have an additional "SweepWidget Giveaways" menu item in the admin dashboard. You can manage and add new giveaways here.321 3. You will now have an additional "SweepWidget Contests" menu item in the admin dashboard. You can manage and add new giveaways here. 143 322 144 323 == Frequently Asked Questions == 145 324 146 325 = What entry methods are available? = 147 Over 90+ entry methods & 30+ social media integrations. See features in the description > entry methods. 148 = What does a promotion look like? 149 You can see examples for every type of giveaways here: [Live Examples](https://sweepwidget.com/examples) 326 Over 130+ entry methods across 30+ social media integrations. See features in the description above for the full list. 327 328 = What does a promotion look like? = 329 You can see examples for every type of giveaway here: [Live Examples](https://sweepwidget.com/examples) 330 150 331 = Do you offer unlimited entries? = 151 Yes! 332 Yes! All plans include unlimited user entries. 333 152 334 = Can I collect email addresses? = 153 Yes! 335 Yes! Collect unlimited emails and export to CSV. Connect to 21+ email marketing platforms including Mailchimp, ActiveCampaign, Klaviyo, HubSpot, ConvertKit, and more. 336 337 = Can I run photo or video contests? = 338 Yes! Users can upload photos or videos, and winners can be chosen by public voting or admin judging. Includes a gallery display, vote counts, and submission moderation. 339 154 340 = How do I add a competition to my WordPress site? = 155 You will get a simple short code that can be added to the body of any post of page. Here's a detailed article on [how it integrates with WordPress](https://sweepwidget.com/docs/how-to-embed-a-sweepwidget-giveaway-into-your-wordpress-site). 341 You will get a simple shortcode that can be added to the body of any post or page. Here's a detailed article on [how it integrates with WordPress](https://sweepwidget.com/docs/how-to-embed-a-sweepwidget-giveaway-into-your-wordpress-site). 342 156 343 = How much does SweepWidget cost? = 157 We have a free plan, pro plan ($29 /m), business plan ($49 /m), premium plan ($99 /m), and an enterprise plan ($199, m). You can see the breakdown of [which features come with each plan](https://sweepwidget.com/pricing). 344 We have a free plan, Pro plan ($29/mo), Business plan ($59/mo), Premium plan ($119/mo), and an Enterprise plan ($249/mo). Annual plans save up to 2 months. You can see the breakdown of [which features come with each plan](https://sweepwidget.com/pricing). 345 158 346 = What payment methods do you offer? = 159 347 We accept all major credit cards and PayPal. 348 160 349 = Can I cancel anytime? = 161 350 Yes! We offer both monthly and annual plans. You can cancel anytime you want and won't be charged again. 351 162 352 = What data will I receive for each entrant? = 163 You will receive: full name, email address, date of birth, entry type, action, entry details, entries worth, time of entry, and country. 353 You will receive: full name, email address, phone number, date of birth, entry type, action, entry details, entries worth, time of entry, country, URL referral parameters, and all custom field responses. 354 164 355 = What integrations does SweepWidget have? = 165 SweepWidget integrates with Zapier, Facebook, Instagram, Twitter, Pinterest, Google Analytics, Google Tag Manager, WordPress, Shopify, MailChimp, Aweber, Active Campaign, Mad Mimi, Constant Contact, Iterable, MailerLite, SendFox, Campaign Monitor, GetResponse, & Drip. 356 SweepWidget integrates with Zapier, Facebook, Instagram, Twitter / X, Threads, Pinterest, YouTube, TikTok, Discord, Twitch, Telegram, Reddit, Spotify, LinkedIn, Google Analytics 4, Google Tag Manager, Facebook / Meta Pixel, TikTok Pixel, WordPress, Shopify, WooCommerce, Mailchimp, AWeber, ActiveCampaign, Constant Contact, ConvertKit, MailerLite, SendFox, Campaign Monitor, GetResponse, Drip, Klaviyo, Iterable, SendGrid, Pabbly, HubSpot, Sendy, EmailOctopus, Omnisend, MailJet, Braze, and more. 357 166 358 = Does SweepWidget offer leaderboard contests? = 167 Yes! [Here's an example leaderboard giveaway](https://sweepwidget.com/examples/leaderboard). Leaderboard contests are a great way to incentivise users to share and engage more. 359 Yes! [Here's an example leaderboard giveaway](https://sweepwidget.com/examples/leaderboard). Leaderboard contests show real-time rankings and are a great way to incentivize users to share and engage more. 360 168 361 = Does SweepWidget offer instant coupons? = 169 Yes! [Here's an example instant coupons giveaway](https://sweepwidget.com/examples/instant-coupons). 362 Yes! [Here's an example instant coupons giveaway](https://sweepwidget.com/examples/instant-coupons). Deliver unique coupon codes automatically when users reach entry milestones. 363 170 364 = Does SweepWidget offer unlock rewards? = 171 Yes! [Here's an example unlock rewards giveaway](https://sweepwidget.com/examples/unlock-rewards). 365 Yes! [Here's an example unlock rewards giveaway](https://sweepwidget.com/examples/unlock-rewards). Users unlock prizes, coupons, and rewards as they earn more entries. 366 367 = Does SweepWidget have anti-fraud protection? = 368 Yes! SweepWidget includes 4 security levels, VPN/proxy/Tor detection, disposable email blocking (4,940+ domains), device fingerprinting, behavioral bot detection, rate limiting, IP blacklists/whitelists, Google reCAPTCHA, honeypot fields, and more. 369 370 = Can I use SweepWidget with Shopify or WooCommerce? = 371 Yes! SweepWidget has dedicated Shopify and WooCommerce apps. Run purchase-based contests where customers earn entries for every $1 spent, with automatic order tracking. 372 172 373 = Do you support different languages? = 173 Yes! You can choose from [103 different languages](https://sweepwidget.com/docs/sweepwidget-multi-language-support) to easily run an international contest (multi-language support). You can also manually edit every single word on the widget (if there are any errors on obscure languages). The following languages are supported: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bosnian, Bulgarian, Catalan, Cebuano, Chinese, Corsican, Croatian, Czech, Danish, Dutch, English, Esperanto, Estonian, Finnish, French, Frisian, Galician, Georgian, German, Greek, Gujarati, Haitian, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Korean, Kurdish, Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Myanmar, Nepali, Norwegian, Nyanja, Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scots, Serbian, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Spanish, Sundanese, Swahili, Swedish, Tagalog, Tajik, Tamil, Telugu, Thai, Turkish, Ukrainian, Urdu, Uzbek, Vietnamese, Welsh, Xhosa, Yiddish, Yoruba, Zulu. 374 Yes! You can choose from [103 different languages](https://sweepwidget.com/docs/sweepwidget-multi-language-support) to easily run an international contest. You can also manually edit every single word on the widget. The following languages are supported: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bosnian, Bulgarian, Catalan, Cebuano, Chinese, Corsican, Croatian, Czech, Danish, Dutch, English, Esperanto, Estonian, Finnish, French, Frisian, Galician, Georgian, German, Greek, Gujarati, Haitian, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Korean, Kurdish, Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Myanmar, Nepali, Norwegian, Nyanja, Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scots, Serbian, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Spanish, Sundanese, Swahili, Swedish, Tagalog, Tajik, Tamil, Telugu, Thai, Turkish, Ukrainian, Urdu, Uzbek, Vietnamese, Welsh, Xhosa, Yiddish, Yoruba, Zulu. 375 174 376 = Can I allow daily entries? = 175 377 Yes! You can choose any interval from 1 entry per hour up to every 24 hours (or at midnight). [View here](https://sweepwidget.com/docs/add-daily-entries). 176 = Can I require manditory entries? = 177 Yes! You can make it so users aren't allowed to perform certain actions until they complete other actions. [View here](https://sweepwidget.com/docs/add-locked-entry-methods). 378 379 = Can I require mandatory entries? = 380 Yes! You can make it so users aren't allowed to perform certain actions until they complete other actions. [View here](https://sweepwidget.com/docs/add-locked-entry-methods). You can also daisy-chain entries to require sequential completion. 381 382 = Does SweepWidget have a Live Draw feature? = 383 Yes! The Live Draw feature provides a full-screen winner announcement interface perfect for live streams and events, complete with confetti animation and prize display. 384 385 = Does SweepWidget have an official rules generator? = 386 Yes! SweepWidget includes a built-in legal rules template generator with 15 sections covering eligibility, prizes, winner selection, terms, and social media disclaimers. 387 388 = Can I invite team members? = 389 Yes! Invite team members with role-based permissions (Administrator, Collaborator, Read-only). Up to 5 team members on Enterprise plans. 390 178 391 = Additional information = 179 Please review our detailed [documentation](https://sweepwidget.com/docs/) for additional instruction . Please access our [terms of use](https://sweepwidget.com/terms-of-use) for any legal questions.392 Please review our detailed [documentation](https://sweepwidget.com/docs/) for additional instructions. Please access our [terms of use](https://sweepwidget.com/terms-of-use) for any legal questions. 180 393 181 394 == Screenshots == … … 225 438 = 2.0.6 = 226 439 * Added some bug fixes to work in all browsers. 440 441 = 2.0.7 = 442 * Security fix: Sanitized and escaped shortcode attributes to prevent stored XSS. 443 * Security fix: Escaped all output throughout the plugin using esc_html(), esc_attr(), and esc_url(). 444 * Replaced raw cURL with WordPress HTTP API (wp_remote_get). 445 * Removed bundled jQuery — now uses WordPress built-in jQuery. 446 * Added direct file access protection. 447 * Moved admin scripts to properly enqueued file with jQuery dependency. 448 * Prefixed all functions to prevent naming conflicts. 449 * Added error handling for API responses. 450 * Modernized admin dashboard design. -
sweepwidget/trunk/sweepwidget.php
r3123387 r3458603 1 1 <?php 2 3 2 /** 4 3 * Plugin Name: SweepWidget 5 4 * Plugin URI: https://sweepwidget.com 6 5 * Description: The best WordPress contest plugin to run viral giveaways, sweepstakes, leaderboard competitions, & instant coupons campaigns, and promotions for over 30+ social platforms. Get more followers, shares, likes, email signups, sales leads, and grow your online presence. 7 * Version: 2.0. 66 * Version: 2.0.7 8 7 * Requires at least: 3.0.1 9 8 * Requires PHP: 7.0 … … 12 11 * License: GPLv3 13 12 * License URI: http://www.gnu.org/licenses/gpl.html 13 * Text Domain: sweepwidget 14 14 */ 15 15 16 function sweepwidget_add_menu() 17 { 16 if ( ! defined( 'ABSPATH' ) ) { 17 exit; 18 } 19 20 define( 'SWEEPWIDGET_VERSION', '2.0.7' ); 21 22 function sweepwidget_add_menu() { 18 23 add_menu_page( 19 24 'SweepWidget Contests', … … 26 31 ); 27 32 } 28 29 add_action('admin_menu', 'sweepwidget_add_menu'); 33 add_action( 'admin_menu', 'sweepwidget_add_menu' ); 30 34 31 35 // Hook into the admin initialization process 32 add_action('admin_init', 'sweepwidget_redirect_to_admin'); 33 34 function sweepwidget_redirect_to_admin() 35 { 36 add_action( 'admin_init', 'sweepwidget_redirect_to_admin' ); 37 38 function sweepwidget_redirect_to_admin() { 36 39 // Check if our option is set 37 if ( get_option('sweepwidget_plugin_activated', false)) {40 if ( get_option( 'sweepwidget_plugin_activated', false ) ) { 38 41 // Delete the option to prevent the redirect on every admin page load 39 delete_option( 'sweepwidget_plugin_activated');42 delete_option( 'sweepwidget_plugin_activated' ); 40 43 41 44 // Perform the redirect 42 wp_redirect( admin_url('admin.php?page=sweepwidget'));45 wp_redirect( admin_url( 'admin.php?page=sweepwidget' ) ); 43 46 exit; 44 47 } … … 46 49 47 50 // Hook into the activation process 48 register_activation_hook(__FILE__, 'sweepwidget_activate'); 49 50 function sweepwidget_activate() 51 { 51 register_activation_hook( __FILE__, 'sweepwidget_activate' ); 52 53 function sweepwidget_activate() { 52 54 // Set an option to trigger the redirect 53 add_option( 'sweepwidget_plugin_activated', true);55 add_option( 'sweepwidget_plugin_activated', true ); 54 56 55 57 // Trigger the redirect immediately after activation 56 if ( is_admin() && !defined('DOING_AJAX') && isset($_GET['activate'])) {57 wp_redirect( admin_url('admin.php?page=sweepwidget'));58 if ( is_admin() && ! defined( 'DOING_AJAX' ) && isset( $_GET['activate'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended 59 wp_redirect( admin_url( 'admin.php?page=sweepwidget' ) ); 58 60 exit; 59 61 } 60 62 } 61 63 62 // Convert language abbr to full text 63 function language_code_to_text($language_code) 64 { 65 $language_code = strtolower($language_code); 66 switch ($language_code) { 67 case "af": 68 $language_text = "Afrikaans"; 69 break; 70 case "sq": 71 $language_text = "Albanian"; 72 break; 73 case "am": 74 $language_text = "Amharic"; 75 break; 76 case "ar": 77 $language_text = "Arabic"; 78 break; 79 case "hy": 80 $language_text = "Armenian"; 81 break; 82 case "az": 83 $language_text = "Azerbaijani"; 84 break; 85 case "eu": 86 $language_text = "Basque"; 87 break; 88 case "be": 89 $language_text = "Belarusian"; 90 break; 91 case "bn": 92 $language_text = "Bengali"; 93 break; 94 case "bs": 95 $language_text = "Bosnian"; 96 break; 97 case "bg": 98 $language_text = "Bulgarian"; 99 break; 100 case "ca": 101 $language_text = "Catalan"; 102 break; 103 case "ceb": 104 $language_text = "Cebuano"; 105 break; 106 case "zh-TW": 107 $language_text = "Chinese"; 108 break; 109 case "co": 110 $language_text = "Corsican"; 111 break; 112 case "hr": 113 $language_text = "Croatian"; 114 break; 115 case "cs": 116 $language_text = "Czech"; 117 break; 118 case "da": 119 $language_text = "Danish"; 120 break; 121 case "nl": 122 $language_text = "Dutch"; 123 break; 124 case "en": 125 $language_text = "English"; 126 break; 127 case "eo": 128 $language_text = "Esperanto"; 129 break; 130 case "et": 131 $language_text = "Estonian"; 132 break; 133 case "fi": 134 $language_text = "Finnish"; 135 break; 136 case "fr": 137 $language_text = "French"; 138 break; 139 case "fy": 140 $language_text = "Frisian"; 141 break; 142 case "gl": 143 $language_text = "Galician"; 144 break; 145 case "ka": 146 $language_text = "Georgian"; 147 break; 148 case "de": 149 $language_text = "German"; 150 break; 151 case "el": 152 $language_text = "Greek"; 153 break; 154 case "gu": 155 $language_text = "Gujarati"; 156 break; 157 case "ht": 158 $language_text = "Haitian"; 159 break; 160 case "ha": 161 $language_text = "Hausa"; 162 break; 163 case "haw": 164 $language_text = "Hawaiian"; 165 break; 166 case "iw": 167 $language_text = "Hebrew"; 168 break; 169 case "hi": 170 $language_text = "Hindi"; 171 break; 172 case "hmn": 173 $language_text = "Hmong"; 174 break; 175 case "hu": 176 $language_text = "Hungarian"; 177 break; 178 case "is": 179 $language_text = "Icelandic"; 180 break; 181 case "ig": 182 $language_text = "Igbo"; 183 break; 184 case "id": 185 $language_text = "Indonesian"; 186 break; 187 case "ga": 188 $language_text = "Irish"; 189 break; 190 case "it": 191 $language_text = "Italian"; 192 break; 193 case "ja": 194 $language_text = "Japanese"; 195 break; 196 case "jw": 197 $language_text = "Javanese"; 198 break; 199 case "kn": 200 $language_text = "Kannada"; 201 break; 202 case "kk": 203 $language_text = "Kazakh"; 204 break; 205 case "km": 206 $language_text = "Khmer"; 207 break; 208 case "ko": 209 $language_text = "Korean"; 210 break; 211 case "ku": 212 $language_text = "Kurdish"; 213 break; 214 case "ky": 215 $language_text = "Kyrgyz"; 216 break; 217 case "lo": 218 $language_text = "Lao"; 219 break; 220 case "la": 221 $language_text = "Latin"; 222 break; 223 case "lv": 224 $language_text = "Latvian"; 225 break; 226 case "lt": 227 $language_text = "Lithuanian"; 228 break; 229 case "lb": 230 $language_text = "Luxembourgish"; 231 break; 232 case "mk": 233 $language_text = "Macedonian"; 234 break; 235 case "mg": 236 $language_text = "Malagasy"; 237 break; 238 case "ms": 239 $language_text = "Malay"; 240 break; 241 case "ml": 242 $language_text = "Malayalam"; 243 break; 244 case "mt": 245 $language_text = "Maltese"; 246 break; 247 case "mi": 248 $language_text = "Maori"; 249 break; 250 case "mr": 251 $language_text = "Marathi"; 252 break; 253 case "mn": 254 $language_text = "Mongolian"; 255 break; 256 case "my": 257 $language_text = "Myanmar"; 258 break; 259 case "ne": 260 $language_text = "Nepali"; 261 break; 262 case "no": 263 $language_text = "Norwegian"; 264 break; 265 case "ny": 266 $language_text = "Nyanja"; 267 break; 268 case "ps": 269 $language_text = "Pashto"; 270 break; 271 case "fa": 272 $language_text = "Persian"; 273 break; 274 case "pl": 275 $language_text = "Polish"; 276 break; 277 case "pt": 278 $language_text = "Portuguese"; 279 break; 280 case "pa": 281 $language_text = "Punjabi"; 282 break; 283 case "ro": 284 $language_text = "Romanian"; 285 break; 286 case "ru": 287 $language_text = "Russian"; 288 break; 289 case "sm": 290 $language_text = "Samoan"; 291 break; 292 case "gd": 293 $language_text = "Scots"; 294 break; 295 case "sr": 296 $language_text = "Serbian"; 297 break; 298 case "st": 299 $language_text = "Sesotho"; 300 break; 301 case "sn": 302 $language_text = "Shona"; 303 break; 304 case "sd": 305 $language_text = "Sindhi"; 306 break; 307 case "si": 308 $language_text = "Sinhala"; 309 break; 310 case "sk": 311 $language_text = "Slovak"; 312 break; 313 case "sl": 314 $language_text = "Slovenian"; 315 break; 316 case "so": 317 $language_text = "Somali"; 318 break; 319 case "es": 320 $language_text = "Spanish"; 321 break; 322 case "su": 323 $language_text = "Sundanese"; 324 break; 325 case "sw": 326 $language_text = "Swahili"; 327 break; 328 case "sv": 329 $language_text = "Swedish"; 330 break; 331 case "tl": 332 $language_text = "Tagalog"; 333 break; 334 case "tg": 335 $language_text = "Tajik"; 336 break; 337 case "ta": 338 $language_text = "Tamil"; 339 break; 340 case "te": 341 $language_text = "Telugu"; 342 break; 343 case "th": 344 $language_text = "Thai"; 345 break; 346 case "tr": 347 $language_text = "Turkish"; 348 break; 349 case "uk": 350 $language_text = "Ukrainian"; 351 break; 352 case "ur": 353 $language_text = "Urdu"; 354 break; 355 case "uz": 356 $language_text = "Uzbek"; 357 break; 358 case "vi": 359 $language_text = "Vietnamese"; 360 break; 361 case "cy": 362 $language_text = "Welsh"; 363 break; 364 case "xh": 365 $language_text = "Xhosa"; 366 break; 367 case "yi": 368 $language_text = "Yiddish"; 369 break; 370 case "yo": 371 $language_text = "Yoruba"; 372 break; 373 case "zu": 374 $language_text = "Zulu"; 375 break; 64 // Convert language abbreviation to full text 65 function sweepwidget_language_code_to_text( $language_code ) { 66 $languages = array( 67 'af' => 'Afrikaans', 68 'sq' => 'Albanian', 69 'am' => 'Amharic', 70 'ar' => 'Arabic', 71 'hy' => 'Armenian', 72 'az' => 'Azerbaijani', 73 'eu' => 'Basque', 74 'be' => 'Belarusian', 75 'bn' => 'Bengali', 76 'bs' => 'Bosnian', 77 'bg' => 'Bulgarian', 78 'ca' => 'Catalan', 79 'ceb' => 'Cebuano', 80 'zh-tw' => 'Chinese', 81 'co' => 'Corsican', 82 'hr' => 'Croatian', 83 'cs' => 'Czech', 84 'da' => 'Danish', 85 'nl' => 'Dutch', 86 'en' => 'English', 87 'eo' => 'Esperanto', 88 'et' => 'Estonian', 89 'fi' => 'Finnish', 90 'fr' => 'French', 91 'fy' => 'Frisian', 92 'gl' => 'Galician', 93 'ka' => 'Georgian', 94 'de' => 'German', 95 'el' => 'Greek', 96 'gu' => 'Gujarati', 97 'ht' => 'Haitian', 98 'ha' => 'Hausa', 99 'haw' => 'Hawaiian', 100 'iw' => 'Hebrew', 101 'hi' => 'Hindi', 102 'hmn' => 'Hmong', 103 'hu' => 'Hungarian', 104 'is' => 'Icelandic', 105 'ig' => 'Igbo', 106 'id' => 'Indonesian', 107 'ga' => 'Irish', 108 'it' => 'Italian', 109 'ja' => 'Japanese', 110 'jw' => 'Javanese', 111 'kn' => 'Kannada', 112 'kk' => 'Kazakh', 113 'km' => 'Khmer', 114 'ko' => 'Korean', 115 'ku' => 'Kurdish', 116 'ky' => 'Kyrgyz', 117 'lo' => 'Lao', 118 'la' => 'Latin', 119 'lv' => 'Latvian', 120 'lt' => 'Lithuanian', 121 'lb' => 'Luxembourgish', 122 'mk' => 'Macedonian', 123 'mg' => 'Malagasy', 124 'ms' => 'Malay', 125 'ml' => 'Malayalam', 126 'mt' => 'Maltese', 127 'mi' => 'Maori', 128 'mr' => 'Marathi', 129 'mn' => 'Mongolian', 130 'my' => 'Myanmar', 131 'ne' => 'Nepali', 132 'no' => 'Norwegian', 133 'ny' => 'Nyanja', 134 'ps' => 'Pashto', 135 'fa' => 'Persian', 136 'pl' => 'Polish', 137 'pt' => 'Portuguese', 138 'pa' => 'Punjabi', 139 'ro' => 'Romanian', 140 'ru' => 'Russian', 141 'sm' => 'Samoan', 142 'gd' => 'Scots', 143 'sr' => 'Serbian', 144 'st' => 'Sesotho', 145 'sn' => 'Shona', 146 'sd' => 'Sindhi', 147 'si' => 'Sinhala', 148 'sk' => 'Slovak', 149 'sl' => 'Slovenian', 150 'so' => 'Somali', 151 'es' => 'Spanish', 152 'su' => 'Sundanese', 153 'sw' => 'Swahili', 154 'sv' => 'Swedish', 155 'tl' => 'Tagalog', 156 'tg' => 'Tajik', 157 'ta' => 'Tamil', 158 'te' => 'Telugu', 159 'th' => 'Thai', 160 'tr' => 'Turkish', 161 'uk' => 'Ukrainian', 162 'ur' => 'Urdu', 163 'uz' => 'Uzbek', 164 'vi' => 'Vietnamese', 165 'cy' => 'Welsh', 166 'xh' => 'Xhosa', 167 'yi' => 'Yiddish', 168 'yo' => 'Yoruba', 169 'zu' => 'Zulu', 170 ); 171 172 $language_code = strtolower( $language_code ); 173 return isset( $languages[ $language_code ] ) ? $languages[ $language_code ] : $language_code; 174 } 175 176 // Display giveaways in the admin dashboard 177 function sweepwidget_display_giveaways( $website_url, $response, $display_type, $base_url ) { 178 if ( ! is_object( $response ) && ! is_array( $response ) ) { 179 return; 376 180 } 377 return $language_text; 378 } 379 380 function display_giveaways($website_url, $response, $display_type, $sweepwidget_wp_params_uri) 381 { 382 foreach ($response as $type) { 383 foreach ($type as $res) { 384 foreach ($res as $r) { 385 $competition_id = $r->competition_id; 386 $competition_url = $r->competition_url; 387 $type = $r->type; 388 $title = $r->title; 389 $description = $r->description; 390 $rules = $r->rules; 391 $start_time = $r->start_time; 392 $end_time = $r->end_time; 393 $time_zone = $r->time_zone; 394 $language = $r->language; 395 $number_of_winners = $r->number_of_winners; 396 $image_loc = $r->image_loc; 397 $image_ext = pathinfo($image_loc, PATHINFO_EXTENSION); 398 $giveaway_embed_code = $r->giveaway_embed_code; 399 $last_active_website = $r->last_active_website; 400 401 if ($type !== $display_type) { 181 182 foreach ( $response as $category ) { 183 if ( ! is_object( $category ) && ! is_array( $category ) ) { 184 continue; 185 } 186 foreach ( $category as $res ) { 187 if ( ! is_object( $res ) && ! is_array( $res ) ) { 188 continue; 189 } 190 foreach ( $res as $r ) { 191 if ( ! is_object( $r ) ) { 402 192 continue; 403 193 } 404 194 405 $deleted = 0; 406 407 ?> 195 $competition_id = absint( $r->competition_id ); 196 $competition_url = sanitize_title( $r->competition_url ); 197 $type = sanitize_text_field( $r->type ); 198 $title = sanitize_text_field( $r->title ); 199 $language = sanitize_text_field( $r->language ); 200 $image_loc = sanitize_text_field( $r->image_loc ); 201 $last_active_website = absint( $r->last_active_website ); 202 203 if ( $type !== $display_type ) { 204 continue; 205 } 206 207 // Build image URL — image_loc may be a full URL or a relative path 208 $image_ext = pathinfo( $image_loc, PATHINFO_EXTENSION ); 209 if ( strpos( $image_loc, 'http' ) === 0 ) { 210 $img_url = $image_loc . '.thumb_200_width.' . $image_ext; 211 } else { 212 $img_url = $website_url . '/' . $image_loc . '.thumb_200_width.' . $image_ext; 213 } 214 215 $comp_slug = $competition_id . '-' . $competition_url; 216 $edit_url = add_query_arg( 'wp_redirect_url', $website_url . '/user/update-widget/' . $last_active_website . '/' . $comp_slug, $base_url ); 217 $hosted_url = $website_url . '/c/' . $comp_slug; 218 $entries_url = add_query_arg( 'wp_redirect_url', $website_url . '/user/reporting/' . $last_active_website . '/' . $comp_slug . '/1', $base_url ); 219 $stats_url = add_query_arg( 'wp_redirect_url', $website_url . '/user/analytics/' . $last_active_website . '/' . $comp_slug, $base_url ); 220 $translation_url = add_query_arg( 'wp_redirect_url', $website_url . '/user/edit-translation/' . $last_active_website . '/' . $language, $base_url ); 221 $whitelist_url = add_query_arg( 'wp_redirect_url', $website_url . '/user/reporting/' . $last_active_website . '/' . $comp_slug . '/1#whitelist-users', $base_url ); 222 $custom_url_url = add_query_arg( 'wp_redirect_url', $website_url . '/user/embed-widget/' . $last_active_website . '/' . $comp_slug . '#custom-url', $base_url ); 223 $pause_url = add_query_arg( 'wp_redirect_url', $website_url . '/user/mute-widget/' . $last_active_website . '/' . $comp_slug, $base_url ); 224 $wp_shortcode = '[sweepwidget id="' . $competition_id . '" url="' . $competition_url . '"]'; 225 226 ?> 408 227 409 228 <div class="user_competitions_each_holder"> … … 411 230 <div class="user_competitions_each_holder_inner"> 412 231 413 <?php if ($image_loc !== 'NULL') { // Has image 414 ?> 415 416 <div class="user_competitions_each_holder_l"> 417 <img style="max-width:100%; height:auto;" src="<?php echo $website_url . '/' . $image_loc; ?>.thumb_200_width.<?php echo $image_ext; ?>" alt="Preview" /> 232 <div class="user_competitions_each_holder_l"> 233 <?php if ( $image_loc !== 'NULL' ) { ?> 234 <img src="<?php echo esc_url( $img_url ); ?>" alt="<?php echo esc_attr( $title ); ?>" /> 235 <?php } else { ?> 236 <div class="sw-placeholder-img" aria-hidden="true"> 237 <svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="#b0b0b0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><path d="m21 15-5-5L5 21"/></svg> 238 </div> 239 <?php } ?> 240 </div> 241 242 <div class="user_competitions_each_holder_r"> 243 244 <div class="user_competitions_each_header"> 245 <?php echo esc_html( $title ); ?> 418 246 </div> 419 247 420 <?php } ?> 421 422 <div class="user_competitions_each_holder_r"> 423 424 <div class="user_competitions_each_header" style="margin-bottom:5px;"> 425 <?php echo $title; ?> 248 <div class="user_competitions_each_links"> 249 <a class="sw-btn-primary" target="_blank" rel="nofollow" href="<?php echo esc_url( $hosted_url ); ?>">View Live Page</a> 250 <a class="sw-btn-outline" target="_blank" rel="nofollow" href="<?php echo esc_url( $edit_url ); ?>">Edit</a> 251 <a class="sw-btn-outline" target="_blank" rel="nofollow" href="<?php echo esc_url( $entries_url ); ?>">Manage Entries</a> 252 <a class="sw-btn-outline" target="_blank" rel="nofollow" href="<?php echo esc_url( $stats_url ); ?>">Analytics</a> 426 253 </div> 427 254 428 <div class="user_competitions_each_links" style="margin-bottom:5px;"> 429 430 <!-- Edit --> 431 <a style="background:#ff6363;" target="_blank" rel="nofollow" href="<?php echo $website_url; ?>?<?php echo $sweepwidget_wp_params_uri; ?>&wp_redirect_url=<?php echo $website_url; ?>/user/update-widget/<?php echo $last_active_website; ?>/<?php echo $competition_id . '-' . $competition_url; ?>">Edit</a> 432 433 <!-- View hosted page --> 434 <a style="background:#4e72d9;" target="_blank" rel="nofollow" href="<?php echo $website_url; ?>/c/<?php echo $competition_id . '-' . $competition_url; ?>">Hosted Page</a> 435 436 <!-- Entries --> 437 <a style="background:#4db4fa;" target="_blank" rel="nofollow" href="<?php echo $website_url; ?>?<?php echo $sweepwidget_wp_params_uri; ?>&wp_redirect_url=<?php echo $website_url; ?>/user/reporting/<?php echo $last_active_website; ?>/<?php echo $competition_id . '-' . $competition_url; ?>/1">Entries</a> 438 439 <!-- Stats --> 440 <a style="background:#ffa345;" target="_blank" rel="nofollow" href="<?php echo $website_url; ?>?<?php echo $sweepwidget_wp_params_uri; ?>&wp_redirect_url=<?php echo $website_url; ?>/user/analytics/<?php echo $last_active_website; ?>/<?php echo $competition_id . '-' . $competition_url; ?>">Stats</a> 441 442 </div> 443 444 <div style="width:100%; margin-bottom:0px; float:left;"> 445 <div id="get_embed_code_<?php echo $competition_id; ?>" class="get_embed_code" data-competition-id="<?php echo $competition_id; ?>" data-embed-type="embed_code"> 446 <div style="width:100%; max-width:300px; float:left;"> 447 Embed into your WordPress site 255 <div class="sw-utility-links"> 256 <span class="sw-more-toggle" data-target="sw-more-<?php echo esc_attr( $competition_id ); ?>">More options ▾</span> 257 258 <div id="sw-more-<?php echo esc_attr( $competition_id ); ?>" class="sw-more-content"> 259 <div id="get_embed_code_<?php echo esc_attr( $competition_id ); ?>" class="get_embed_code" data-competition-id="<?php echo esc_attr( $competition_id ); ?>" data-embed-type="embed_code"> 260 Embed Into Your WordPress Site 448 261 </div> 262 263 <div id="user_competitions_embed_code_each_textarea_message_<?php echo esc_attr( $competition_id ); ?>" class="user_competitions_each_textarea_message"> 264 Copy & paste this shortcode into the text of any post or page in your WordPress site. 265 <a href="https://sweepwidget.com/docs/how-to-embed-a-sweepwidget-giveaway-into-your-wordpress-site" target="_blank" rel="nofollow">View Instructions</a> 266 </div> 267 268 <input id="user_competitions_embed_code_each_textarea_<?php echo esc_attr( $competition_id ); ?>" class="user_competitions_each_textarea" value="<?php echo esc_attr( $wp_shortcode ); ?>" /> 269 270 <?php if ( $language !== 'en' ) { ?> 271 <a target="_blank" rel="nofollow" class="get_embed_code" href="<?php echo esc_url( $translation_url ); ?>"> 272 Edit <?php echo esc_html( sweepwidget_language_code_to_text( $language ) ); ?> Translations 273 </a> 274 <?php } ?> 275 276 <a class="get_embed_code" target="_blank" rel="nofollow" href="<?php echo esc_url( $whitelist_url ); ?>"> 277 Allow / Disallow Entrant Emails or IP's 278 </a> 279 280 <a class="get_embed_code" target="_blank" rel="nofollow" href="<?php echo esc_url( $custom_url_url ); ?>"> 281 Create a Unique URL for Your Hosted Landing Page 282 </a> 283 284 <a class="get_embed_code sw-pause-link" target="_blank" rel="nofollow" href="<?php echo esc_url( $pause_url ); ?>">Pause Giveaway</a> 449 285 </div> 450 286 </div> 451 452 <?php $wp_shortcode = '[sweepwidget id="' . $competition_id . '" url="' . $competition_url . '"]'; ?>453 454 <div id="user_competitions_embed_code_each_textarea_message_<?php echo $competition_id; ?>" class="user_competitions_each_textarea_message" style="margin:20px 0 0 0; color:#999; line-height:24px;">455 Copy & paste this shortcode into the text of any post or page in your WordPress site.<br />456 <a style="color:#33adff; font-weight:bold; text-decoration:underline;" href="https://sweepwidget.com/docs/how-to-embed-a-sweepwidget-giveaway-into-your-wordpress-site" target="_blank" rel="nofollow">457 View Instructions458 </a>459 <br />460 </div>461 462 <input id="user_competitions_embed_code_each_textarea_<?php echo $competition_id; ?>" class="user_competitions_each_textarea" value='<?php echo $wp_shortcode; ?>' style=" width:96%;463 max-width:350px;464 height: inherit;465 margin: 15px 0 20px 0;466 padding: 7px 2%;467 color: #999;468 font-size: 14px;469 line-height: 18px;470 border: 2px solid #eee;" />471 472 <!-- Edit langage - not english -->473 <?php if ($language !== 'en') { ?>474 475 <div style="width:100%; float:left;">476 477 <a target="_blank" rel="nofollow" class="get_embed_code" style="color:#33adff; text-decoration:none;" href="<?php echo $website_url; ?>?<?php echo $sweepwidget_wp_params_uri; ?>&wp_redirect_url=<?php echo $website_url; ?>/user/edit-translation/<?php echo $last_active_website . '/' . $language; ?>">478 479 Edit <?php echo language_code_to_text($language); ?> Translations480 481 </a>482 483 </div>484 485 <?php } ?>486 487 <div style="width:100%; margin-bottom:-5px; float:left;">488 <div style="width:100%; margin-top:0px; float:left;">489 <a style="color:#33adff; text-decoration:none;" class="get_embed_code" style="font-weight:bold;" target="_blank" rel="nofollow" href="<?php echo $website_url; ?>?<?php echo $sweepwidget_wp_params_uri; ?>&wp_redirect_url=<?php echo $website_url; ?>/user/reporting/<?php echo $last_active_website; ?>/<?php echo $competition_id . '-' . $competition_url; ?>/1#whitelist-users">490 Allow / disallow entrant emails or IP's491 </a>492 </div>493 </div>494 495 <div style="width:100%; margin-bottom:-5px; float:left;">496 <div style="width:100%; margin-top:5px; float:left;">497 <a style="color:#33adff; text-decoration:none;" class="get_embed_code" style="font-weight:bold;" target="_blank" rel="nofollow" href="<?php echo $website_url; ?>?<?php echo $sweepwidget_wp_params_uri; ?>&wp_redirect_url=<?php echo $website_url; ?>/user/embed-widget/<?php echo $last_active_website; ?>/<?php echo $competition_id . '-' . $competition_url; ?>#custom-url">498 Create a unique URL for your hosted landing page499 </a>500 </div>501 </div>502 503 <!-- Restore link for deleted sweep -->504 <?php if ($deleted == 1) { ?>505 506 <div style="width:100%; margin-top:15px; float:left;">507 <a style="color:#0f9921; text-decoration:none;" class="get_embed_code" target="_blank" rel="nofollow" href="<?php echo $website_url; ?>?<?php echo $sweepwidget_wp_params_uri; ?>&wp_redirect_url=<?php echo $website_url; ?>/user/restore-widget/<?php echo $last_active_website; ?>/<?php echo $competition_id . '-' . $competition_url; ?>">Restore Widget</a>508 </div>509 510 <div style="width:100%; margin-top:15px; float:left;">511 <a style="color:#999; text-decoration:none;" class="get_embed_code" target="_blank" rel="nofollow" href="<?php echo $website_url; ?>?<?php echo $sweepwidget_wp_params_uri; ?>&wp_redirect_url=<?php echo $website_url; ?>/user/delete-widget/<?php echo $last_active_website; ?>/<?php echo $competition_id . '-' . $competition_url; ?>">Permanently Delete Giveaway</a>512 </div>513 514 <!-- Delete link-->515 <?php } else { ?>516 517 <div style="width:100%; margin-top:15px; float:left;">518 <a style="color:#999; text-decoration:none;" class="get_embed_code" target="_blank" rel="nofollow" href="<?php echo $website_url; ?>?<?php echo $sweepwidget_wp_params_uri; ?>&wp_redirect_url=<?php echo $website_url; ?>/user/mute-widget/<?php echo $last_active_website; ?>/<?php echo $competition_id . '-' . $competition_url; ?>">Pause Giveaway</a>519 </div>520 521 <?php } ?>522 287 523 288 </div> … … 535 300 536 301 // Display SweepWidget menu in admin console 537 function sweepwidget_admin_menu_main() 538 { 539 540 $protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443 || $_SERVER['HTTP_X_FORWARDED_PORT'] == 443) ? "https://" : "http://"; 541 $sweepwidget_current_wp_user_id = get_current_user_id(); 542 $sweepwidget_current_domain = get_site_url(); 543 $sweepwidget_current_wp_user_info = wp_get_current_user(); 302 function sweepwidget_admin_menu_main() { 303 304 $sweepwidget_current_wp_user_id = get_current_user_id(); 305 $sweepwidget_current_domain = get_site_url(); 306 $sweepwidget_current_wp_user_info = wp_get_current_user(); 544 307 $sweepwidget_current_wp_user_email = $sweepwidget_current_wp_user_info->user_email; 545 $sweepwidget_current_wp_user_name = $sweepwidget_current_wp_user_info->display_name;308 $sweepwidget_current_wp_user_name = $sweepwidget_current_wp_user_info->display_name; 546 309 547 310 // Get SweepWidget access token 548 $sweepwidget_access_token = get_option( 'sweepwidget_access_token', false);311 $sweepwidget_access_token = get_option( 'sweepwidget_access_token', false ); 549 312 550 313 // If SweepWidget access token doesn't exist, create it 551 if (empty($sweepwidget_access_token)) { 552 553 $sweepwidget_access_token = wp_generate_password(64, false, false); 554 add_option('sweepwidget_access_token', $sweepwidget_access_token, '', 'yes'); 314 if ( empty( $sweepwidget_access_token ) ) { 315 $sweepwidget_access_token = wp_generate_password( 64, false, false ); 316 add_option( 'sweepwidget_access_token', $sweepwidget_access_token, '', 'yes' ); 555 317 } 556 318 557 $sweepwidget_logo = plugins_url('public/img/sweepwidget_logo.png', __FILE__); 558 559 $sweepwidget_wp_params_uri = 'wp_is_true=1&wp_domain=' . $sweepwidget_current_domain . '&wp_user_id=' . $sweepwidget_current_wp_user_id . '&wp_user_email=' . $sweepwidget_current_wp_user_email . '&wp_user_name=' . $sweepwidget_current_wp_user_name . '&wp_access_token=' . $sweepwidget_access_token . '&wp_new_version=1'; 560 561 $sweepwidget_link = 'https://sweepwidget.com?' . $sweepwidget_wp_params_uri; 319 $sweepwidget_logo = plugins_url( 'public/img/sweepwidget_logo.png', __FILE__ ); 320 $website_url = 'https://sweepwidget.com'; 321 322 // Build base URL with all auth params properly encoded 323 $base_url = add_query_arg( array( 324 'wp_is_true' => '1', 325 'wp_domain' => $sweepwidget_current_domain, 326 'wp_user_id' => $sweepwidget_current_wp_user_id, 327 'wp_user_email' => $sweepwidget_current_wp_user_email, 328 'wp_user_name' => $sweepwidget_current_wp_user_name, 329 'wp_access_token' => $sweepwidget_access_token, 330 'wp_new_version' => '1', 331 ), $website_url ); 332 333 // Build common admin URLs 334 $account_url = add_query_arg( array( 'wp_redirect_page' => 'sweepwidget', 'wp_redirect_url' => '' ), $base_url ); 335 $new_giveaway_url = add_query_arg( array( 'wp_redirect_page' => 'build-widget', 'wp_redirect_url' => '' ), $base_url ); 336 $manage_url = add_query_arg( array( 'wp_redirect_page' => 'sweepwidget', 'wp_redirect_url' => '' ), $base_url ); 337 $settings_url = add_query_arg( array( 'wp_redirect_page' => 'update-profile', 'wp_redirect_url' => '' ), $base_url ); 338 $integrations_url = add_query_arg( array( 'wp_redirect_page' => 'integrations', 'wp_redirect_url' => '' ), $base_url ); 339 $affiliates_url = add_query_arg( array( 'wp_redirect_page' => 'affiliates', 'wp_redirect_url' => '' ), $base_url ); 562 340 563 341 ?> … … 570 348 571 349 <h2 id="sweepwidget_header"> 572 573 <a target="_blank" href="<?php echo $sweepwidget_link; ?>&wp_redirect_page=sweepwidget&wp_redirect_url="> 574 <img style="border:none; outline:none;" src="<?php echo $sweepwidget_logo; ?>" /> 575 </a> 576 350 <a target="_blank" href="<?php echo esc_url( $account_url ); ?>"> 351 <img src="<?php echo esc_url( $sweepwidget_logo ); ?>" alt="SweepWidget" /> 352 </a> 577 353 </h2> 578 354 579 <div class="sweepwidget_content_wrapper" style="font-size:15px; line-height:25px;"> 580 355 <div class="sweepwidget_content_wrapper"> 581 356 Welcome to your SweepWidget giveaway dashboard! Create a new giveaway by clicking the "+ New Giveaway" button below. Once it's finished, you can add it to any WordPress post or page with a simple 1-line embed code. 582 583 357 </div> 584 358 585 359 </div> 586 360 587 <!-- Return all of this in JSON response. Do the same as SweepWidget e.g. live, scheduled, finished. -->588 589 361 <?php 590 362 591 $website_url = 'https://sweepwidget.com'; 592 593 $curl = curl_init(); 594 595 $url_get_lists = "https://sweepwidget.com/sw_api/wp_giveaways?api_key=$sweepwidget_access_token&type=live&page_start=1"; 596 597 curl_setopt_array($curl, array( 598 CURLOPT_URL => $url_get_lists, 599 CURLOPT_RETURNTRANSFER => true, 600 CURLOPT_ENCODING => "", 601 CURLOPT_MAXREDIRS => 10, 602 CURLOPT_TIMEOUT => 30, 603 CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 604 CURLOPT_CUSTOMREQUEST => "GET", 605 CURLOPT_HTTPHEADER => array( 606 "Content-Type: application/json" // You must set the content-type to application/json 607 ), 608 )); 609 610 $response = json_decode(curl_exec($curl)); 611 curl_close($curl); 612 363 // Fetch giveaways from SweepWidget API 364 $api_url = add_query_arg( array( 365 'api_key' => $sweepwidget_access_token, 366 'type' => 'live', 367 'page_start' => '1', 368 ), $website_url . '/sw_api/wp_giveaways' ); 369 370 $api_response = wp_remote_get( $api_url, array( 371 'timeout' => 30, 372 'headers' => array( 'Content-Type' => 'application/json' ), 373 ) ); 374 375 if ( is_wp_error( $api_response ) ) { 376 ?> 377 <div class="sw-error-message"> 378 Unable to connect to SweepWidget. Please try again later. 379 </div> 380 </div></div> 381 <?php 382 return; 383 } 384 385 $response_body = wp_remote_retrieve_body( $api_response ); 386 $response = json_decode( $response_body ); 387 388 if ( empty( $response ) ) { 389 ?> 390 <div class="sw-error-message"> 391 No data received from SweepWidget. Please check your connection. 392 </div> 393 </div></div> 394 <?php 395 return; 396 } 397 398 // Count giveaways by type 399 $live_count = 0; 613 400 $scheduled_count = 0; 614 $expired_count = 0; 615 $live_count = 0; 616 617 // Live count 618 foreach ($response->live as $type) { 619 foreach ($type as $res) { 620 $live_count++; 401 $expired_count = 0; 402 403 if ( isset( $response->live ) && ( is_object( $response->live ) || is_array( $response->live ) ) ) { 404 foreach ( $response->live as $category ) { 405 if ( ! is_object( $category ) && ! is_array( $category ) ) { 406 continue; 407 } 408 foreach ( $category as $item ) { 409 $live_count++; 410 } 621 411 } 622 412 } 623 413 624 // Expired count 625 foreach ($response->expired as $type) { 626 foreach ($type as $res) { 627 $expired_count++; 414 if ( isset( $response->expired ) && ( is_object( $response->expired ) || is_array( $response->expired ) ) ) { 415 foreach ( $response->expired as $category ) { 416 if ( ! is_object( $category ) && ! is_array( $category ) ) { 417 continue; 418 } 419 foreach ( $category as $item ) { 420 $expired_count++; 421 } 628 422 } 629 423 } 630 424 631 // Scheduled count 632 foreach ($response->scheduled as $type) { 633 foreach ($type as $res) { 634 $scheduled_count++; 425 if ( isset( $response->scheduled ) && ( is_object( $response->scheduled ) || is_array( $response->scheduled ) ) ) { 426 foreach ( $response->scheduled as $category ) { 427 if ( ! is_object( $category ) && ! is_array( $category ) ) { 428 continue; 429 } 430 foreach ( $category as $item ) { 431 $scheduled_count++; 432 } 635 433 } 636 434 } … … 640 438 <!-- New Giveaway link --> 641 439 <div id="sweepwidget_nav_holder"> 642 643 <a target="_blank" href="<?php echo $sweepwidget_link; ?>&wp_redirect_page=build-widget&wp_redirect_url=" style="padding:20px 38px; font-size:20px; border-radius:50px;">+ New Giveaway</a> 644 440 <a target="_blank" href="<?php echo esc_url( $new_giveaway_url ); ?>">+ New Giveaway</a> 645 441 </div> 646 442 647 443 <!-- Additional links --> 648 <div id="sweepwidget_nav_holder_2" style="margin-top:10px; margin-bottom:10px;"> 649 650 <a target="_blank" href="<?php echo $sweepwidget_link; ?>&wp_redirect_page=sweepwidget&wp_redirect_url=" style="background:#33adff; border:1px solid #33adff; font-size:15px; padding:7px 14px;">Manage Giveaways</a> 651 652 <a target="_blank" href="<?php echo $sweepwidget_link; ?>&wp_redirect_page=update-profile&wp_redirect_url=" style="background:#33adff; border:1px solid #33adff; font-size:15px; padding:7px 14px">Account Settings</a> 653 654 <a target="_blank" href="<?php echo $sweepwidget_link; ?>&wp_redirect_page=integrations&wp_redirect_url=" style="background:#33adff; border:1px solid #33adff; font-size:15px; padding:7px 14px">Integrations</a> 655 656 <a target="_blank" href="https://sweepwidget.com/docs" style="background:#33adff; border:1px solid #33adff; font-size:15px; padding:7px 14px">Docs</a> 657 658 <a target="_blank" href="<?php echo $sweepwidget_link; ?>&wp_redirect_page=affiliates&wp_redirect_url=" style="background:#33adff; border:1px solid #33adff; font-size:15px; padding:7px 14px">Affiliate Program</a> 659 444 <div id="sweepwidget_nav_holder_2"> 445 <a target="_blank" href="<?php echo esc_url( $manage_url ); ?>">Manage Giveaways</a> 446 <a target="_blank" href="<?php echo esc_url( $settings_url ); ?>">Account Settings</a> 447 <a target="_blank" href="<?php echo esc_url( $integrations_url ); ?>">Integrations</a> 448 <a target="_blank" href="https://sweepwidget.com/docs">Docs</a> 449 <a target="_blank" href="<?php echo esc_url( $affiliates_url ); ?>">Affiliate Program</a> 660 450 </div> 661 451 … … 663 453 664 454 <!-- Live giveaways display --> 665 <h2 id="user_sub_header_live_giveaways" class="user_sub_header" style="width:100%; margin-top:20px; margin-bottom:5px; font-size:22px; text-align:center; float:left;"> 666 <span id="live_giveaways_header_num" style="color:#3652a3;"></span> 667 <span id="live_giveaways_header_text"></span> 668 </h2> 669 670 <?php display_giveaways($website_url, $response, 'Live', $sweepwidget_wp_params_uri); ?> 671 672 <script> 673 var live_count = '<?php echo $live_count; ?>'; 674 675 if (live_count == 0) { 676 $('#live_giveaways_header_num').hide(); 677 } 678 if (live_count > 0) { 679 document.getElementById("live_giveaways_header_num").innerHTML = live_count; 680 } 681 if (live_count == 1) { 682 document.getElementById("live_giveaways_header_text").innerHTML = "Live Giveaway"; 683 } else if (live_count >= 2) { 684 document.getElementById("live_giveaways_header_text").innerHTML = "Live Giveaways"; 685 } 686 </script> 455 <?php if ( $live_count > 0 ) { ?> 456 <h2 class="user_sub_header"> 457 <span class="sw-count"><?php echo absint( $live_count ); ?></span> 458 <?php echo $live_count === 1 ? 'Live Giveaway' : 'Live Giveaways'; ?> 459 </h2> 460 <?php } ?> 461 462 <?php sweepwidget_display_giveaways( $website_url, $response, 'Live', $base_url ); ?> 687 463 688 464 <!-- Scheduled giveaways display --> 689 <h2 id="user_sub_header_scheduled_giveaways" class="user_sub_header" style="width:100%; margin-top:20px; margin-bottom:5px; font-size:22px; text-align:center; float:left;"> 690 <span id="scheduled_giveaways_header_num" style="color:#3652a3;"></span> 691 <span id="scheduled_giveaways_header_text"></span> 692 </h2> 693 694 <?php display_giveaways($website_url, $response, 'Scheduled', $sweepwidget_wp_params_uri); ?> 695 696 <script> 697 var scheduled_count = '<?php echo $scheduled_count; ?>'; 698 if (scheduled_count == 0) { 699 $('#user_sub_header_scheduled_giveaways').hide(); 700 } 701 if (scheduled_count > 0) { 702 document.getElementById("scheduled_giveaways_header_num").innerHTML = scheduled_count; 703 } 704 if (scheduled_count == 1) { 705 document.getElementById("scheduled_giveaways_header_text").innerHTML = "Scheduled Giveaway"; 706 } else if (scheduled_count >= 2) { 707 document.getElementById("scheduled_giveaways_header_text").innerHTML = "Scheduled Giveaways"; 708 } 709 </script> 465 <?php if ( $scheduled_count > 0 ) { ?> 466 <h2 class="user_sub_header"> 467 <span class="sw-count"><?php echo absint( $scheduled_count ); ?></span> 468 <?php echo $scheduled_count === 1 ? 'Scheduled Giveaway' : 'Scheduled Giveaways'; ?> 469 </h2> 470 <?php } ?> 471 472 <?php sweepwidget_display_giveaways( $website_url, $response, 'Scheduled', $base_url ); ?> 710 473 711 474 <!-- Expired giveaways display --> 712 <h2 id="user_sub_header_expired_giveaways" class="user_sub_header" style="width:100%; margin-top:20px; margin-bottom:5px; font-size:22px; text-align:center; float:left;"> 713 <span id="expired_giveaways_header_num" style="color:#3652a3;"></span> 714 <span id="expired_giveaways_header_text"></span> 715 </h2> 716 717 <?php display_giveaways($website_url, $response, 'Expired', $sweepwidget_wp_params_uri); ?> 718 719 <script> 720 var expired_count = '<?php echo $expired_count; ?>'; 721 722 if (expired_count == 0) { 723 $('#user_sub_header_expired_giveaways').hide(); 724 } 725 if (expired_count > 0) { 726 document.getElementById("expired_giveaways_header_num").innerHTML = expired_count; 727 } 728 if (expired_count == 1) { 729 document.getElementById("expired_giveaways_header_text").innerHTML = "Expired Giveaway"; 730 } else if (expired_count >= 2) { 731 document.getElementById("expired_giveaways_header_text").innerHTML = "Expired Giveaways"; 732 } 733 </script> 475 <?php if ( $expired_count > 0 ) { ?> 476 <h2 class="user_sub_header"> 477 <span class="sw-count"><?php echo absint( $expired_count ); ?></span> 478 <?php echo $expired_count === 1 ? 'Expired Giveaway' : 'Expired Giveaways'; ?> 479 </h2> 480 <?php } ?> 481 482 <?php sweepwidget_display_giveaways( $website_url, $response, 'Expired', $base_url ); ?> 734 483 735 484 <div class="user_account_getting_started_links_wrapper"> 736 485 737 486 <div class="user_account_getting_started_link"> 738 <a target="_blank" rel="nofollow" href="https://sweepwidget.com/blog/how-to-create-a-successful-online-giveaway-in-8-easy-steps-2020" style="color:#33adff;">487 <a target="_blank" rel="nofollow" href="https://sweepwidget.com/blog/how-to-create-a-successful-online-giveaway-in-8-easy-steps-2020"> 739 488 Tips: Run A Successful Giveaway 740 489 </a> … … 742 491 743 492 <div class="user_account_getting_started_link"> 744 <a target="_blank" rel="nofollow" href="https://sweepwidget.com/docs/how-to-create-a-giveaway-with-sweepwidget" style="color:#33adff;">493 <a target="_blank" rel="nofollow" href="https://sweepwidget.com/docs/how-to-create-a-giveaway-with-sweepwidget"> 745 494 Learn The SweepWidget Basics 746 495 </a> … … 748 497 749 498 <div class="user_account_getting_started_link"> 750 <a target="_blank" rel="nofollow" href="https://sweepwidget.com/docs/" style="color:#33adff;">499 <a target="_blank" rel="nofollow" href="https://sweepwidget.com/docs/"> 751 500 Full SweepWidget Documentation 752 501 </a> … … 755 504 </div> 756 505 757 <div id="user_examples_wrapper" class="entry_methods_box_holder_3" style="width:84%; margin:20px 8% 25px 8%; padding:5px 30px 20px 30px;">758 759 <div style="width:100%; margin:25px 0 27px 0; font-size:22px; font-weight:bold; text-align:center; float:left;">506 <div id="user_examples_wrapper"> 507 508 <div class="sw-launchpad-heading"> 760 509 Giveaway Launchpad 761 510 </div> 762 511 763 512 <div class="user_examples_link_holder"> 764 <a target="_blank" rel="nofollow" href="<?php echo $sweepwidget_link; ?>&wp_redirect_page=build-widget&wp_redirect_url=" style="color:#fff; background:#3652a3;">513 <a target="_blank" rel="nofollow" href="<?php echo esc_url( $new_giveaway_url ); ?>" style="color:#fff; background:#4a3aff;"> 765 514 Start From Scratch 766 515 </a> … … 768 517 769 518 <div class="user_examples_link_holder"> 770 <a target="_blank" rel="nofollow" href="<?php echo $sweepwidget_link; ?>&wp_redirect_page=build-widget&wp_redirect_url=&launchpad_hash=leaderboard" style="color:#fff; background:#ff8157;">519 <a target="_blank" rel="nofollow" href="<?php echo esc_url( add_query_arg( 'launchpad_hash', 'leaderboard', $new_giveaway_url ) ); ?>" style="color:#fff; background:#ff8157;"> 771 520 Leaderboard 772 521 </a> … … 774 523 775 524 <div class="user_examples_link_holder"> 776 <a target="_blank" rel="nofollow" href="<?php echo $sweepwidget_link; ?>&wp_redirect_page=build-widget&wp_redirect_url=&launchpad_hash=unlock_prizes" style="color:#fff; background:#31e0d7">525 <a target="_blank" rel="nofollow" href="<?php echo esc_url( add_query_arg( 'launchpad_hash', 'unlock_prizes', $new_giveaway_url ) ); ?>" style="color:#fff; background:#31e0d7"> 777 526 Unlock Prizes 778 527 </a> … … 780 529 781 530 <div class="user_examples_link_holder"> 782 <a target="_blank" rel="nofollow" href="<?php echo $sweepwidget_link; ?>&wp_redirect_page=build-widget&wp_redirect_url=&launchpad_hash=instant_coupons" style="color:#fff; background:#31e06c;">531 <a target="_blank" rel="nofollow" href="<?php echo esc_url( add_query_arg( 'launchpad_hash', 'instant_coupons', $new_giveaway_url ) ); ?>" style="color:#fff; background:#31e06c;"> 783 532 Instant Coupons 784 533 </a> … … 822 571 'upload_a_file_add|#f4cb58', 823 572 'visit_a_page_add|#0079bf', 824 'youtube_add|#cd201f' 573 'youtube_add|#cd201f', 825 574 ); 826 575 827 foreach ( $giveaways_array as $g_full) {828 829 $g_exp = explode('|', $g_full);830 $g = $g_exp[0];576 foreach ( $giveaways_array as $g_full ) { 577 578 $g_exp = explode( '|', $g_full ); 579 $g = $g_exp[0]; 831 580 $background_color = $g_exp[1]; 832 581 833 $g_remove_add = str_ireplace('_add', '', $g); 834 $g_remove_add = str_ireplace('facebook', 'facebook_page_like', $g_remove_add); 835 $g_remove_add = str_ireplace('youtube', 'youtube_channel_subscribe', $g_remove_add); 836 $g_remove_add = str_ireplace('twitter', 'twitter_follow', $g_remove_add); 837 $g_remove_add = str_ireplace('pinterest', 'pinterest_follow_user', $g_remove_add); 838 $g_remove_add = str_ireplace('instagram', 'instagram_follow', $g_remove_add); 839 $g_remove_add = str_ireplace('twitch', 'twitch_follow', $g_remove_add); 840 $g_remove_add = str_ireplace('tumblr', 'tumblr_follow', $g_remove_add); 841 $g_remove_add = str_ireplace('linkedin', 'linkedin_follow', $g_remove_add); 842 $g_remove_add = str_ireplace('soundcloud', 'soundcloud_like_song', $g_remove_add); 843 $g_remove_add = str_ireplace('eventbrite', 'attend_eventbrite_event', $g_remove_add); 844 $g_remove_add = str_ireplace('crypto_wallet', 'btc_crypto_wallet', $g_remove_add); 845 $g_remove_add = str_ireplace('telegram', 'telegram_join_channel', $g_remove_add); 846 $g_remove_add = str_ireplace('spotify', 'spotify_follow', $g_remove_add); 847 $g_remove_add = str_ireplace('medium', 'medium_clap', $g_remove_add); 848 849 $g_display = str_ireplace('_add', '', $g); 850 $g_display = str_ireplace('_follow', '', $g_display); 851 $g_display = str_ireplace('_join_group', '', $g_display); 852 $g_display = str_ireplace('_join_server', '', $g_display); 853 $g_display = str_ireplace('_page_visit', '', $g_display); 854 $g_display = str_ireplace('email_subscribe', 'newsletter', $g_display); 855 $g_display = str_ireplace('custom_add', 'create_your_own_entry_method', $g_display); 856 $g_display = str_ireplace('refer_friends_add', 'refer_a_friend', $g_display); 857 $g_display = str_ireplace('_subscribe', '', $g_display); 858 $g_display = str_ireplace('_', ' ', $g_display); 859 $g_display = ucwords($g_display); 860 861 $g = str_ireplace('tiktok_follow_add', 'tiktok_add', $g); 862 863 if ($g_display === 'Snapchat') { 864 $color = '#000'; 865 } else { 866 $color = '#fff'; 867 } 582 $g_display = str_ireplace( '_add', '', $g ); 583 $g_display = str_ireplace( '_follow', '', $g_display ); 584 $g_display = str_ireplace( '_join_group', '', $g_display ); 585 $g_display = str_ireplace( '_join_server', '', $g_display ); 586 $g_display = str_ireplace( '_page_visit', '', $g_display ); 587 $g_display = str_ireplace( 'email_subscribe', 'newsletter', $g_display ); 588 $g_display = str_ireplace( '_subscribe', '', $g_display ); 589 $g_display = str_ireplace( '_', ' ', $g_display ); 590 $g_display = ucwords( $g_display ); 591 592 $g = str_ireplace( 'tiktok_follow_add', 'tiktok_add', $g ); 593 594 $color = ( $g_display === 'Snapchat' ) ? '#000' : '#fff'; 595 596 $entry_url = add_query_arg( 'launchpad_hash', $g, $new_giveaway_url ); 868 597 869 598 ?> 870 599 871 600 <div class="user_examples_link_holder"> 872 <a target="_blank" rel="nofollow" href="<?php echo $sweepwidget_link; ?>&wp_redirect_page=build-widget&wp_redirect_url=&launchpad_hash=<?php echo $g; ?>" style="color:<?php echo $color; ?>; background:<?php echo $background_color; ?>">873 <?php echo $g_display; ?>601 <a target="_blank" rel="nofollow" href="<?php echo esc_url( $entry_url ); ?>" style="color:<?php echo esc_attr( $color ); ?>; background:<?php echo esc_attr( $background_color ); ?>"> 602 <?php echo esc_html( $g_display ); ?> 874 603 </a> 875 604 </div> … … 887 616 </div> 888 617 889 <script>890 $(document.body).on('click', '.get_embed_code', function() {891 892 var id = $(this).attr('id');893 var comptition_id = $(this).attr('data-competition-id');894 var embed_type = $(this).attr('data-embed-type');895 896 $('#user_competitions_' + embed_type + '_each_textarea_' + comptition_id).slideToggle(300, function() {897 $(this).click(function() {898 $(this).select();899 });900 });901 902 $('#user_competitions_' + embed_type + '_each_textarea_message_' + comptition_id).toggle();903 904 });905 </script>906 907 618 <?php 908 619 909 620 } 910 621 911 // Admin head scripts 912 function sweepwidget_scripts() 913 { 914 915 // CSS 916 wp_register_style('sweepwidget_css', plugins_url('public/css/sw.css?v=2.1', __FILE__)); 917 wp_enqueue_style('sweepwidget_css'); 622 // Enqueue admin scripts and styles 623 function sweepwidget_scripts( $hook ) { 624 if ( 'toplevel_page_sweepwidget' !== $hook ) { 625 return; 626 } 627 628 $css_ver = filemtime( plugin_dir_path( __FILE__ ) . 'public/css/sw.css' ); 629 $js_ver = filemtime( plugin_dir_path( __FILE__ ) . 'public/js/sweepwidget-admin.js' ); 630 wp_enqueue_style( 'sweepwidget-css', plugins_url( 'public/css/sw.css', __FILE__ ), array(), $css_ver ); 631 wp_enqueue_script( 'sweepwidget-admin', plugins_url( 'public/js/sweepwidget-admin.js', __FILE__ ), array( 'jquery' ), $js_ver, true ); 632 } 633 add_action( 'admin_enqueue_scripts', 'sweepwidget_scripts' ); 634 635 // Shortcode to embed SweepWidget widget 636 function sweepwidget_embed_widget( $attr ) { 637 638 $args = shortcode_atts( array( 639 'id' => '', 640 'url' => '', 641 ), $attr ); 642 643 // Sanitize inputs - id should be alphanumeric, url should be a slug 644 $id = preg_replace( '/[^a-zA-Z0-9]/', '', $args['id'] ); 645 $url = preg_replace( '/[^a-zA-Z0-9\-]/', '', $args['url'] ); 918 646 919 647 // JS 920 wp_enqueue_script('sw_jquery_script', plugins_url('public/js/jquery-3.7.1.js', __FILE__), array(), false, false); 921 } 922 add_action('admin_init', 'sweepwidget_scripts'); 923 924 // Shortcode with multiple attributes 925 function sweepwidget_embed_widget($attr) 926 { 927 928 $args = shortcode_atts(array( 929 'id' => '', 930 'url' => '' 931 ), $attr); 932 933 // JS 934 wp_enqueue_script('w_init', 'https://sweepwidget.com/w/j/w_init.js', array(), '1.0', true); 935 936 $output = '<div id="' . $args['id'] . '-' . $args['url'] . '" class="sw_container full"></div>'; 648 wp_enqueue_script( 'sweepwidget-init', 'https://sweepwidget.com/w/j/w_init.js', array(), null, true ); 649 650 $output = '<div id="' . esc_attr( $id . '-' . $url ) . '" class="sw_container full"></div>'; 937 651 return $output; 938 652 } 939 add_shortcode('sweepwidget', 'sweepwidget_embed_widget'); 940 941 ?> 653 add_shortcode( 'sweepwidget', 'sweepwidget_embed_widget' );
Note: See TracChangeset
for help on using the changeset viewer.