Changeset 2772043
- Timestamp:
- 08/18/2022 11:14:27 AM (3 years ago)
- Location:
- wp-sendfox/trunk
- Files:
-
- 10 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-sendfox/trunk/lang/sf4wp.pot
r2522017 r2772043 3 3 msgstr "" 4 4 "Project-Id-Version: SendFox for Wordpress\n" 5 "POT-Creation-Date: 202 1-04-27 16:42+0600\n"5 "POT-Creation-Date: 2022-08-17 17:12+0600\n" 6 6 "PO-Revision-Date: 2020-03-03 17:39+0600\n" 7 7 "Last-Translator: \n" … … 17 17 "X-Poedit-SearchPath-0: .\n" 18 18 19 #: includes/gutenberg/gutenberg-email-optin.php:53 20 msgid "" 21 "A customizable email optin block that allows to let people subscribe to " 22 "your SendFox lists" 23 msgstr "" 24 25 #: includes/gutenberg/gutenberg-email-optin.php:55 26 msgid "Can not retrieve lists from SendFox. Please, check your API key." 27 msgstr "" 28 29 #: includes/gutenberg/gutenberg-email-optin.php:57 30 msgid "Form Heading" 31 msgstr "" 32 33 #: includes/gutenberg/gutenberg-email-optin.php:59 34 msgid "Enter form heading..." 35 msgstr "" 36 37 #: includes/gutenberg/gutenberg-email-optin.php:61 38 msgid "Form Description" 39 msgstr "" 40 41 #: includes/gutenberg/gutenberg-email-optin.php:63 42 msgid "Enter form description..." 43 msgstr "" 44 45 #: includes/gutenberg/gutenberg-email-optin.php:65 46 msgid "Select SendFox List" 47 msgstr "" 48 49 #: includes/gutenberg/gutenberg-email-optin.php:67 50 msgid "Button Label" 51 msgstr "" 52 53 #: includes/gutenberg/gutenberg-email-optin.php:69 54 msgid "Enter button label..." 55 msgstr "" 56 57 #: includes/gutenberg/gutenberg-email-optin.php:71 58 msgid "Heading Text Color" 59 msgstr "" 60 61 #: includes/gutenberg/gutenberg-email-optin.php:73 62 msgid "Description Text Color" 63 msgstr "" 64 65 #: includes/gutenberg/gutenberg-email-optin.php:75 66 msgid "Button Label Color" 67 msgstr "" 68 69 #: includes/gutenberg/gutenberg-email-optin.php:77 70 msgid "Button Background Color" 71 msgstr "" 72 73 #: includes/gutenberg/gutenberg-email-optin.php:79 74 msgid "Form Background Color" 75 msgstr "" 76 77 #: includes/gutenberg/gutenberg-email-optin.php:81 78 msgid "Form Background Image" 79 msgstr "" 80 81 #: includes/gutenberg/gutenberg-email-optin.php:83 82 msgid "Upload Image" 83 msgstr "" 84 85 #: includes/gutenberg/gutenberg-email-optin.php:85 86 msgid "Remove Image" 87 msgstr "" 88 89 #: includes/gutenberg/gutenberg-email-optin.php:87 90 msgid "First name" 91 msgstr "" 92 93 #: includes/gutenberg/gutenberg-email-optin.php:89 94 msgid "Last name" 95 msgstr "" 96 97 #: includes/gutenberg/gutenberg-email-optin.php:91 98 msgid "Email" 99 msgstr "" 100 101 #: includes/gutenberg/gutenberg-email-optin.php:124 102 msgid "All fields are required." 103 msgstr "" 104 105 #: includes/gutenberg/gutenberg-email-optin.php:126 106 msgid "You have entered an invalid email address." 107 msgstr "" 108 109 #: includes/gutenberg/gutenberg-email-optin.php:128 110 msgid "Unable to process request. Please, contact support." 111 msgstr "" 112 113 #: includes/gutenberg/gutenberg-email-optin.php:130 114 msgid "Thanks for subscribing!" 115 msgstr "" 116 19 117 #: wp-sendfox-admin.php:89 20 118 msgid "Thank you for using this plugin. You are amazing!" … … 25 123 msgstr "" 26 124 27 #: wp-sendfox-admin.php:100 wp-sendfox-admin.php:2 71125 #: wp-sendfox-admin.php:100 wp-sendfox-admin.php:288 28 126 msgid "Integrations" 29 127 msgstr "" … … 49 147 msgstr "" 50 148 51 #: wp-sendfox-admin.php:157 wp-sendfox.php:3 93149 #: wp-sendfox-admin.php:157 wp-sendfox.php:381 52 150 msgid "Error: Response Status" 53 151 msgstr "" … … 120 218 msgstr "" 121 219 122 #: wp-sendfox-admin.php:2 59220 #: wp-sendfox-admin.php:262 123 221 msgid "WooCommerce Checkout" 124 222 msgstr "" 125 223 126 #: wp-sendfox-admin.php:26 0224 #: wp-sendfox-admin.php:263 127 225 msgid "Subscribes people from WooCommerce's checkout form" 128 226 msgstr "" 129 227 130 #: wp-sendfox-admin.php:272 228 #: wp-sendfox-admin.php:269 229 msgid "Divi Email Optin" 230 msgstr "" 231 232 #: wp-sendfox-admin.php:270 233 msgid "Adds SendFox to the list of providers in Divi's Email Optin block" 234 msgstr "" 235 236 #: wp-sendfox-admin.php:276 237 msgid "Gutenberg Email Optin" 238 msgstr "" 239 240 #: wp-sendfox-admin.php:277 241 msgid "" 242 "Adds new customizable Email Optin block to Gutenberg. Pick a list and let " 243 "everybody subscribe from any page." 244 msgstr "" 245 246 #: wp-sendfox-admin.php:289 131 247 msgid "back to all integrations" 132 248 msgstr "" 133 249 134 #: wp-sendfox-admin.php:2 81250 #: wp-sendfox-admin.php:298 135 251 msgid "" 136 252 "The table below shows all available integrations. Click on the name of an " … … 138 254 msgstr "" 139 255 140 #: wp-sendfox-admin.php: 289256 #: wp-sendfox-admin.php:306 141 257 msgid "integration settings" 142 258 msgstr "" 143 259 144 #: wp-sendfox-admin.php:3 06260 #: wp-sendfox-admin.php:323 145 261 msgid "Name" 146 262 msgstr "" 147 263 148 #: wp-sendfox-admin.php:3 07264 #: wp-sendfox-admin.php:324 149 265 msgid "Description" 150 266 msgstr "" 151 267 152 #: wp-sendfox-admin.php:3 08268 #: wp-sendfox-admin.php:325 153 269 msgid "Status" 154 270 msgstr "" 155 271 156 #: wp-sendfox-admin.php:3 17272 #: wp-sendfox-admin.php:334 157 273 msgid "Configure this integration" 158 274 msgstr "" 159 275 160 #: wp-sendfox-admin.php:3 57276 #: wp-sendfox-admin.php:374 wp-sendfox-admin.php:598 wp-sendfox-admin.php:635 161 277 msgid "Enable?" 162 278 msgstr "" 163 279 164 #: wp-sendfox-admin.php:367 wp-sendfox-admin.php:385 wp-sendfox-admin.php:405 165 #: wp-sendfox-admin.php:487 280 #: wp-sendfox-admin.php:384 wp-sendfox-admin.php:402 wp-sendfox-admin.php:422 281 #: wp-sendfox-admin.php:504 wp-sendfox-admin.php:524 wp-sendfox-admin.php:608 282 #: wp-sendfox-admin.php:645 166 283 msgid "yes" 167 284 msgstr "" 168 285 169 #: wp-sendfox-admin.php:3 69286 #: wp-sendfox-admin.php:386 170 287 #, php-format 171 288 msgid "" … … 173 290 msgstr "" 174 291 175 #: wp-sendfox-admin.php:3 75292 #: wp-sendfox-admin.php:392 176 293 msgid "Implicit?" 177 294 msgstr "" 178 295 179 #: wp-sendfox-admin.php: 387296 #: wp-sendfox-admin.php:404 180 297 msgid "" 181 298 "Select \"yes\" if you want to subscribe people without asking them " … … 183 300 msgstr "" 184 301 185 #: wp-sendfox-admin.php: 389302 #: wp-sendfox-admin.php:406 186 303 msgid "Does not bypass the double opt-in on Free & Lifetime plans." 187 304 msgstr "" 188 305 189 #: wp-sendfox-admin.php: 395306 #: wp-sendfox-admin.php:412 190 307 msgid "Pre-checked?" 191 308 msgstr "" 192 309 193 #: wp-sendfox-admin.php:4 07310 #: wp-sendfox-admin.php:424 194 311 msgid "Select \"yes\" if the checkbox should be pre-checked." 195 312 msgstr "" 196 313 197 #: wp-sendfox-admin.php:4 13314 #: wp-sendfox-admin.php:430 198 315 msgid "SendFox list" 199 316 msgstr "" 200 317 201 #: wp-sendfox-admin.php:4 25 wp-sendfox-admin.php:585318 #: wp-sendfox-admin.php:442 wp-sendfox-admin.php:698 202 319 msgid "are you connected to SendFox?" 203 320 msgstr "" 204 321 205 #: wp-sendfox-admin.php:4 36322 #: wp-sendfox-admin.php:453 206 323 msgid "select the list..." 207 324 msgstr "" 208 325 209 #: wp-sendfox-admin.php:4 59326 #: wp-sendfox-admin.php:476 210 327 msgid "Checkbox label text" 211 328 msgstr "" 212 329 213 #: wp-sendfox-admin.php:4 71330 #: wp-sendfox-admin.php:488 214 331 msgid "" 215 332 "HTML tags like <code><strong><em><a></code> are allowed in " … … 217 334 msgstr "" 218 335 219 #: wp-sendfox-admin.php:4 77336 #: wp-sendfox-admin.php:494 220 337 msgid "Load default CSS?" 221 338 msgstr "" 222 339 223 #: wp-sendfox-admin.php: 489340 #: wp-sendfox-admin.php:506 224 341 msgid "Select \"yes\" if the checkbox looks sloppy." 225 342 msgstr "" 226 343 227 #: wp-sendfox-admin.php:497 344 #: wp-sendfox-admin.php:514 345 msgid "Manual comment approval check?" 346 msgstr "" 347 348 #: wp-sendfox-admin.php:526 349 msgid "" 350 "Submit email to SendFox after comment was approved manually. Otherwise, " 351 "only emails from auto approved comments will be submitted." 352 msgstr "" 353 354 #: wp-sendfox-admin.php:536 228 355 msgid "Position on checkout" 229 356 msgstr "" 230 357 231 #: wp-sendfox-admin.php:5 02358 #: wp-sendfox-admin.php:541 232 359 msgid "select the position..." 233 360 msgstr "" 234 361 235 #: wp-sendfox-admin.php:5 11362 #: wp-sendfox-admin.php:550 236 363 msgid "After billing details" 237 364 msgstr "" 238 365 239 #: wp-sendfox-admin.php:5 12366 #: wp-sendfox-admin.php:551 240 367 msgid "After shipping details" 241 368 msgstr "" 242 369 243 #: wp-sendfox-admin.php:5 13370 #: wp-sendfox-admin.php:552 244 371 msgid "After customer details" 245 372 msgstr "" 246 373 247 #: wp-sendfox-admin.php:5 14374 #: wp-sendfox-admin.php:553 248 375 msgid "Before submit button" 249 376 msgstr "" 250 377 251 #: wp-sendfox-admin.php:5 15378 #: wp-sendfox-admin.php:554 252 379 msgid "After order notes" 253 380 msgstr "" 254 381 255 #: wp-sendfox-admin.php:557 382 #: wp-sendfox-admin.php:593 383 msgid "" 384 "Important: Please, make sure only one Divi Theme or Divi Builder is " 385 "enabled on your site. Either one theme or one plugin." 386 msgstr "" 387 388 #: wp-sendfox-admin.php:610 389 #, php-format 390 msgid "" 391 "Enable the %s integration? This will add SendFox to the list of email " 392 "providers in Divi." 393 msgstr "" 394 395 #: wp-sendfox-admin.php:646 396 #, php-format 397 msgid "" 398 "Enable the %s integration? This will add new Email Optin block to " 399 "Gutenberg blocks." 400 msgstr "" 401 402 #: wp-sendfox-admin.php:670 256 403 msgid "Export your contacts" 257 404 msgstr "" 258 405 259 #: wp-sendfox-admin.php: 561406 #: wp-sendfox-admin.php:674 260 407 msgid "" 261 408 "Here you can export either all your Wordpress user emails or all your " … … 263 410 msgstr "" 264 411 265 #: wp-sendfox-admin.php: 563412 #: wp-sendfox-admin.php:676 266 413 msgid "If email already exists in your list(s), it will be ignored." 267 414 msgstr "" 268 415 269 #: wp-sendfox-admin.php: 567416 #: wp-sendfox-admin.php:680 270 417 msgid "" 271 418 "To start pick the destination and source below and click \"Start export\":" 272 419 msgstr "" 273 420 274 #: wp-sendfox-admin.php: 572421 #: wp-sendfox-admin.php:685 275 422 msgid "Pick the List (export destination):" 276 423 msgstr "" 277 424 278 #: wp-sendfox-admin.php: 605425 #: wp-sendfox-admin.php:718 279 426 msgid "Pick Export mode (export source):" 280 427 msgstr "" 281 428 282 #: wp-sendfox-admin.php: 609429 #: wp-sendfox-admin.php:722 283 430 msgid "Export Wordpress user emails" 284 431 msgstr "" 285 432 286 #: wp-sendfox-admin.php: 610433 #: wp-sendfox-admin.php:723 287 434 msgid "Export WooCommerce customer emails" 288 435 msgstr "" 289 436 290 #: wp-sendfox-admin.php: 615437 #: wp-sendfox-admin.php:728 291 438 msgid "Do not close or reload the page during export." 292 439 msgstr "" 293 440 294 #: wp-sendfox-admin.php: 627441 #: wp-sendfox-admin.php:740 295 442 msgid "Start export" 296 443 msgstr "" 297 444 298 #: wp-sendfox-admin.php: 631445 #: wp-sendfox-admin.php:744 299 446 msgid "Contacts exported successfully:" 300 447 msgstr "" 301 448 302 #: wp-sendfox-admin.php: 632449 #: wp-sendfox-admin.php:745 303 450 msgid "Contacts not exported:" 304 451 msgstr "" 305 452 306 #: wp-sendfox-admin.php: 876453 #: wp-sendfox-admin.php:989 307 454 msgid "Logged data" 308 455 msgstr "" 309 456 310 #: wp-sendfox-admin.php: 880457 #: wp-sendfox-admin.php:993 311 458 msgid "" 312 459 "Here you can find the detailed description of all the SendFox API requests " … … 314 461 msgstr "" 315 462 316 #: wp-sendfox-admin.php: 891463 #: wp-sendfox-admin.php:1004 317 464 msgid "Log was cleared successfully." 318 465 msgstr "" 319 466 320 #: wp-sendfox-admin.php: 899467 #: wp-sendfox-admin.php:1012 321 468 msgid "Oops, log is empty..." 322 469 msgstr "" 323 470 324 #: wp-sendfox-admin.php: 913471 #: wp-sendfox-admin.php:1026 325 472 msgid "Clear log" 326 473 msgstr "" 327 474 328 #: wp-sendfox.php:1 31475 #: wp-sendfox.php:126 329 476 msgid "Oops, you can't access this page." 330 477 msgstr "" 331 478 332 #: wp-sendfox.php:2 95479 #: wp-sendfox.php:283 333 480 msgid "API Key is not set." 334 481 msgstr "" 335 482 336 #: wp-sendfox.php:3 53483 #: wp-sendfox.php:341 337 484 msgid "JSON Parse" 338 485 msgstr "" -
wp-sendfox/trunk/readme.txt
r2522017 r2772043 4 4 Tags: sendfox, integration, woocommerce, wordpress, wp, export, emails, users, api 5 5 Requires at least: 4.6 6 Tested up to: 5.76 Tested up to: 6.0 7 7 Requires PHP: 5.2.4 8 Stable tag: 1. 0.28 Stable tag: 1.1.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html 11 11 12 Capture emails and add them to your SendFox list via comments, registration or WooCommerce checkout. Export your WP users and WooCommerce customers to your list.12 Capture emails and add them to your SendFox list via comments, registration, WooCommerce checkout, Gutenberg page or Divi Builder page. Export your WP users and WooCommerce customers to your list. 13 13 14 14 == Description == 15 15 16 This plugin lets you capture emails from your WP comment form, WP registration form and WooCommerce checkout form.16 This plugin lets you capture emails from your WP comment form, WP registration form, WooCommerce checkout form, pages built with Gutenberg and Divi Builder. 17 17 18 18 You can: … … 25 25 All you need to start using this plugin is your SendFox API key (aka "Personal Access Token"). 26 26 27 SendFox website, title and logo are owned by [Sumo Group, Inc.](https://sumo.com/?utm_source=sf4wp&utm_medium=web&utm_campaign=wpplugindesc) 27 ###### SendFox website, title and logo are owned by [Sumo Group, Inc.](https://sumo.com/?utm_source=sf4wp&utm_medium=web&utm_campaign=wpplugindesc) ###### 28 28 29 29 == Installation == … … 51 51 4. WooCommerce Checkout integration screen. Capture emails of those who buys in your store. 52 52 5. Export screen. Export emails of WordPress users or WooCommerce customers to your SendFox list. 53 6. Gutenberg Editor. New Email Optin block connected to your SendFox account. 54 7. Divi Builder. SendFox added to the list of email providers in Divi Email Optin block. 53 55 54 56 == Changelog == 57 58 = 1.1.0 = 59 * feature: integrated SendFox to the Divi Builder's Email Optin module (Big thanks to Rodolfo Martinez!); 60 * feature: added a custom Gutenberg Email Optin block that allows to pick a list and subscribe to SendFox (Big thanks to Rodolfo Martinez!); 61 * feature: (optionally) submit comment author email to SendFox only after comment is approved manually; 62 * tweak: submit comment author email to SendFox only after comment is approved automatically; 63 * tweak: replaced esc_url with esc_attr to fix "Clear log" link; 55 64 56 65 = 1.0.2 = … … 68 77 == Upgrade Notice == 69 78 79 = 1.1.0 = 80 Integration for Divi, Gutenberg opt-in block, spam fix for Comment Form integration. 81 70 82 = 1.0.2 = 71 83 A couple of minor tweaks + speed improvement. -
wp-sendfox/trunk/wp-sendfox-admin.php
r2522017 r2772043 256 256 'description' => __( 'Subscribes people from your WordPress registration form', 'sf4wp' ), 257 257 ), 258 259 // WooCommerce checkout integration 260 258 261 'woocommerce-checkout' => array( 259 262 'title' => __( 'WooCommerce Checkout', 'sf4wp' ), 260 263 'description' => __( 'Subscribes people from WooCommerce\'s checkout form', 'sf4wp' ), 264 ), 265 266 // Divi Builder integration 267 268 'divi' => array( 269 'title' => __( 'Divi Email Optin', 'sf4wp' ), 270 'description' => __( 'Adds SendFox to the list of providers in Divi\'s Email Optin block', 'sf4wp' ), 271 ), 272 273 // Gutenberg integration 274 275 'gutenberg' => array( 276 'title' => __( 'Gutenberg Email Optin', 'sf4wp' ), 277 'description' => __( 'Adds new customizable Email Optin block to Gutenberg. Pick a list and let everybody subscribe from any page.', 'sf4wp' ), 261 278 ), 262 279 ); … … 492 509 </tr> 493 510 511 <?php if( 'wp-comment-form' === $integration ): ?> 512 513 <tr> 514 <th><?php _e( 'Manual comment approval check?', 'sf4wp' ); ?></th> 515 <td> 516 517 <input 518 type="checkbox" 519 name="gb_sf4wp_options[<?php echo $integration; ?>][approved_check]" 520 value="1" 521 <?php 522 echo ( !empty( $options[ $integration ]['approved_check'] ) ? 523 checked( $options[ $integration ]['approved_check'], '1', FALSE ) : '' ); 524 ?> /> <?php _e( 'yes', 'sf4wp' ); ?> 525 526 <p class="hint"><?php _e( 'Submit email to SendFox after comment was approved manually. Otherwise, only emails from auto approved comments will be submitted.', 'sf4wp' ); ?></p> 527 528 </td> 529 </tr> 530 531 <?php endif; ?> 532 494 533 <?php if( 'woocommerce-checkout' === $integration ): ?> 495 534 … … 543 582 544 583 <?php 584 elseif( 585 'divi' === $integration 586 ): 587 588 if( empty( $options[ $integration ] ) ) 589 { 590 $options[ $integration ] = array(); 591 } 592 ?> 593 <p><b><?php _e( 'Important: Please, make sure only one Divi Theme or Divi Builder is enabled on your site. Either one theme or one plugin.', 'sf4wp' ); ?></b></p> 594 595 <table class="form-table"><tbody> 596 597 <tr> 598 <th><?php _e( 'Enable?', 'sf4wp' ); ?></th> 599 <td> 600 601 <input 602 type="checkbox" 603 name="gb_sf4wp_options[<?php echo $integration; ?>][enabled]" 604 value="1" 605 <?php 606 echo ( !empty( $options[ $integration ]['enabled'] ) ? 607 checked( $options[ $integration ]['enabled'], '1', FALSE ) : '' ); 608 ?> /> <?php _e( 'yes', 'sf4wp' ); ?> 609 610 <p class="hint"><?php echo sprintf( __( 'Enable the %s integration? This will add SendFox to the list of email providers in Divi.', 'sf4wp' ), $all_integrations[ $integration ]['title'] ); ?></p> 611 612 </td> 613 </tr> 614 615 </tbody></table> 616 617 <?php // to help pre_update_option function process single checkbox properly ?> 618 <input type="hidden" name="gb_sf4wp_options[<?php echo $integration; ?>][dummy]" value="1" /> 619 620 <div> 621 <?php submit_button(); ?> 622 </div> 623 624 <?php 625 elseif( 626 'gutenberg' === $integration 627 ): 628 if( empty( $options[ $integration ] ) ) 629 { 630 $options[ $integration ] = array(); 631 } 632 ?> 633 <table class="form-table"><tbody> 634 <tr> 635 <th><?php _e( 'Enable?', 'sf4wp' ); ?></th> 636 <td> 637 638 <input 639 type="checkbox" 640 name="gb_sf4wp_options[<?php echo $integration; ?>][enabled]" 641 value="1" 642 <?php 643 echo ( !empty( $options[ $integration ]['enabled'] ) ? 644 checked( $options[ $integration ]['enabled'], '1', FALSE ) : '' ); 645 ?> /> <?php _e( 'yes', 'sf4wp' ); ?> 646 <p class="hint"><?php echo sprintf( __( 'Enable the %s integration? This will add new Email Optin block to Gutenberg blocks.', 'sf4wp' ), $all_integrations[ $integration ]['title'] ); ?></p> 647 </td> 648 </tr> 649 </tbody></table> 650 <?php // to help pre_update_option function process single checkbox properly ?> 651 <input type="hidden" name="gb_sf4wp_options[<?php echo $integration; ?>][dummy]" value="1" /> 652 <div> 653 <?php submit_button(); ?> 654 </div> 655 656 657 <?php 545 658 endif; 546 659 ?> … … 891 1004 echo '<p><b>' . __( 'Log was cleared successfully.', 'sf4wp' ) . '</b></p>'; 892 1005 893 echo '<script type="text/javascript">document.location.replace("admin.php?page=' . esc_ url( $_GET['page'] ) . '&tab=log");</script>';1006 echo '<script type="text/javascript">document.location.replace("admin.php?page=' . esc_attr( $_GET['page'] ) . '&tab=log");</script>'; 894 1007 } 895 1008 } … … 911 1024 echo '<div><textarea>' . trim( $contents ) . '</textarea></div>'; 912 1025 913 echo '<div><br /><a href="admin.php?page=' . esc_ url( $_GET['page'] ) . '&tab=log&clear-log=1" class="button button-secondary">' . __( 'Clear log', 'sf4wp' ) . '</a></div>';1026 echo '<div><br /><a href="admin.php?page=' . esc_attr( $_GET['page'] ) . '&tab=log&clear-log=1" class="button button-secondary">' . __( 'Clear log', 'sf4wp' ) . '</a></div>'; 914 1027 ?> 915 1028 -
wp-sendfox/trunk/wp-sendfox.php
r2522017 r2772043 3 3 Plugin Name: WP SendFox 4 4 Plugin URI: https://wordpress.org/plugins/wp-sendfox/ 5 Description: Capture emails and add them to your SendFox list via comments, registration or WooCommerce checkout. Export your WP users and WooCommerce customers to your list.5 Description: Capture emails and add them to your SendFox list via comments, registration, WooCommerce checkout, Gutenberg page or Divi Builder page. Export your WP users and WooCommerce customers to your list. 6 6 Author: BogdanFix 7 7 Author URI: https://bogdanfix.com/ 8 Version: 1. 0.28 Version: 1.1.0 9 9 Text Domain: sf4wp 10 10 Domain Path: /lang … … 16 16 17 17 define( 'GB_SF4WP_NAME', 'SendFox for WordPress' ); 18 define( 'GB_SF4WP_VER', '1. 0.2' );18 define( 'GB_SF4WP_VER', '1.1.0' ); 19 19 define( 'GB_SF4WP_ID', 'wp-sendfox' ); 20 20 … … 35 35 36 36 add_action( 'comment_form_after_fields', 'gb_sf4wp_comment_form' ); 37 38 // if( !is_user_logged_in() )39 // {40 // add_action( 'comment_form', 'gb_sf4wp_comment_form' );41 // }42 37 43 38 // registration form … … 132 127 } 133 128 134 // if( !class_exists( 'WC_Payment_Gateway' ) )135 // {136 // wp_die( __( 'Oops, this plugin needs WooCommerce plugin to be active.', 'sf4wp' ) );137 // }138 139 129 include_once 'wp-sendfox-admin.php'; 140 130 } … … 241 231 } 242 232 } 243 244 // add button to clear transients245 233 246 234 // update data in the final response … … 524 512 */ 525 513 526 function gb_sf4wp_comment_post( $comment_id )514 function gb_sf4wp_comment_post( $comment_id, $comment_approved ) 527 515 { 528 516 if( !empty( $_POST['sf4wp-subscribe'] ) ) … … 533 521 { 534 522 $options = get_option( 'gb_sf4wp_options' ); 523 524 // either process email from auto-approved comment or 525 // from manually approved one, when status transition happens 526 527 if( $comment_approved == 0 ) 528 { 529 // mark comment data to be sent to SendFox only after approval 530 531 if( !empty( $options['wp-comment-form']['approved_check'] ) ) 532 { 533 add_comment_meta( $comment_id, 'sf4wp_send', 1, TRUE ); 534 535 return; 536 } 537 else 538 { 539 return; 540 } 541 } 542 543 // if comment data is submitted instantly 535 544 536 545 if( … … 558 567 } 559 568 } 560 add_action( 'comment_post', 'gb_sf4wp_comment_post' ); 569 add_action( 'comment_post', 'gb_sf4wp_comment_post', 10, 2 ); 570 571 /** 572 * Comment Form: process manual comment approval 573 * 574 * @since 1.1.0 575 */ 576 577 function gb_sf4wp_comment_approved( $new_status, $old_status, $comment ) 578 { 579 if( $old_status === $new_status ) 580 { 581 return; 582 } 583 584 if( $new_status !== 'approved' ) 585 { 586 return; 587 } 588 589 if( 590 !empty( $comment ) && 591 !empty( $comment->comment_ID ) && 592 !empty( $comment->comment_author_email ) 593 ) 594 { 595 $options = get_option( 'gb_sf4wp_options' ); 596 597 // if comment data is marked to be sent to SendFox after approval 598 599 if( get_comment_meta( $comment->comment_ID, 'sf4wp_send', TRUE ) ) 600 { 601 if( 602 !empty( $options['wp-comment-form'] ) && 603 !empty( $options['wp-comment-form']['list'] ) 604 ) 605 { 606 $contact = array( 607 'email' => $comment->comment_author_email, 608 'lists' => array( 609 intval( $options['wp-comment-form']['list'] ), 610 ), 611 ); 612 613 if( !empty( $comment->comment_author ) ) 614 { 615 $contact['first_name'] = $comment->comment_author; 616 } 617 618 $contact = apply_filters( 'sf4wp_before_add_contact', $contact, 'comment', $comment ); 619 620 $result = gb_sf4wp_add_contact( $contact ); 621 } 622 } 623 } 624 } 625 add_action( 'transition_comment_status', 'gb_sf4wp_comment_approved', 10, 3 ); 561 626 562 627 /** … … 1023 1088 1024 1089 /** 1090 * Integration: Replace pluggable Divi Builder's method to 1091 * register 3rd-party components 1092 * 1093 * @since 1.1.0 1094 */ 1095 1096 if ( ! function_exists( 'et_core_get_third_party_components' ) ): 1097 1098 function et_core_get_third_party_components( $group = '' ) 1099 { 1100 $third_party_components = apply_filters( 'et_core_get_third_party_components', array(), $group ); 1101 1102 return $third_party_components; 1103 } 1104 1105 endif; 1106 1107 /** 1108 * Integration: Add SendFox email provider to Divi Builder opt-ins 1109 * 1110 * @since 1.1.0 1111 */ 1112 1113 function gb_sf4wp_add_divi_provider( $third_party_components, $group ) 1114 { 1115 if( class_exists( 'ET_Core_API_Email_Provider' ) ) 1116 { 1117 if( $group === 'api' || $group === 'api/email' ) 1118 { 1119 $options = get_option( 'gb_sf4wp_options' ); 1120 1121 if( !empty( $options['divi'] ) && !empty( $options['divi']['enabled'] ) ) 1122 { 1123 require_once plugin_dir_path( __FILE__ ) . 'includes/divi-builder/divi-email-provider.php'; 1124 1125 $third_party_components['sendfox'] = new ET_Core_API_Email_SendFox( 'builder', 'default', '' ); 1126 } 1127 } 1128 } 1129 1130 return $third_party_components; 1131 } 1132 add_filter( 'et_core_get_third_party_components', 'gb_sf4wp_add_divi_provider', 1, 2 ); 1133 1134 /** 1135 * Integration: Add SendFox email provider to Gutenberg Email Optin 1136 * 1137 * @since 1.0.0 1138 */ 1139 1140 function gb_sf4wp_add_gutenberg_email_optin() 1141 { 1142 if( function_exists( 'has_blocks' ) ) 1143 { 1144 $options = get_option( 'gb_sf4wp_options' ); 1145 1146 if( !empty( $options['gutenberg'] ) && !empty( $options['gutenberg']['enabled'] ) ) 1147 { 1148 require_once plugin_dir_path( __FILE__ ) . 'includes/gutenberg/gutenberg-email-optin.php'; 1149 } 1150 } 1151 } 1152 add_action( 'after_setup_theme', 'gb_sf4wp_add_gutenberg_email_optin' ); 1153 1154 /** 1025 1155 * Helper: Simple logging function, useful for debugging 1026 1156 *
Note: See TracChangeset
for help on using the changeset viewer.