Changeset 2719145
- Timestamp:
- 05/06/2022 08:18:31 AM (4 years ago)
- Location:
- activecampaign-newsletter-subscription
- Files:
-
- 12 edited
- 1 copied
-
tags/1.0.1 (copied) (copied from activecampaign-newsletter-subscription/trunk)
-
tags/1.0.1/README.md (modified) (3 diffs)
-
tags/1.0.1/activecampaign-newsletter-subscription.php (modified) (3 diffs)
-
tags/1.0.1/app/admin/class-activecampaign-newsletter-subscription-admin.php (modified) (12 diffs)
-
tags/1.0.1/app/main/class-activecampaign-newsletter-subscription.php (modified) (5 diffs)
-
tags/1.0.1/languages/default.pot (modified) (3 diffs)
-
tags/1.0.1/readme.txt (modified) (2 diffs)
-
trunk/README.md (modified) (3 diffs)
-
trunk/activecampaign-newsletter-subscription.php (modified) (3 diffs)
-
trunk/app/admin/class-activecampaign-newsletter-subscription-admin.php (modified) (12 diffs)
-
trunk/app/main/class-activecampaign-newsletter-subscription.php (modified) (5 diffs)
-
trunk/languages/default.pot (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
activecampaign-newsletter-subscription/tags/1.0.1/README.md
r2710568 r2719145 1 1 # ActiveCampaign Newsletter Subscription # 2 - **Contributors:** bhargavbhandari90, hackkzy404, biliplugins 3 - **Donate link:** https://www.paypal.me/BnB90/10 2 - **Contributors:** bhargavbhandari90, hackkzy404 4 3 - **Tags:** activecampaign, newsletter, newsletter subscription, active campaign 5 4 - **Requires at least:** 4.0 6 5 - **Tested up to:** 5.9.3 7 6 - **Requires PHP:** 5.6 8 - **Stable Tag:** 1.0. 07 - **Stable Tag:** 1.0.1 9 8 - **License:** GPLv2 or later 10 9 - **License URI:** http://www.gnu.org/licenses/gpl-2.0.html … … 14 13 This is Newsletter Subscription Plugin, Which is used to add users to Selected ActiveCampaign List. 15 14 16 https://youtu.be/VeHCBy9Gv5A 15 ## Pro Features ## 16 17 - Supports thirdparty Plugins 18 - This pro plugin has compatibility with the following plugins: 19 1. *Buddypress* 20 2. *WooCommerce* 21 > [Get ActiveCampaign Newsletter Subscription Pro](https://buntywp.gumroad.com/l/dxitz) 17 22 18 23 ## How to use? ## … … 39 44 </p> 40 45 46 ## How to Configure? ## 47 https://youtu.be/VeHCBy9Gv5A 48 41 49 ## Installation ## 42 1. Upload "activecampaign-newsletter-subscription" to the "/wp-content/plugins/" directory us ong FTP or upload plugin zip using upload button.50 1. Upload "activecampaign-newsletter-subscription" to the "/wp-content/plugins/" directory using FTP or upload plugin zip using upload button. 43 51 2. Activate the plugin through the "Plugins" menu in WordPress. 44 52 45 53 ## Changelog ## 46 54 55 ### 1.0.1 ### 56 * Compatibility with pro plugin. 47 57 ### 1.0.0 ### 48 58 * Initial release. -
activecampaign-newsletter-subscription/tags/1.0.1/activecampaign-newsletter-subscription.php
r2710566 r2719145 4 4 * Plugin URI: https://bhargavb.com/ 5 5 * Description: This Plugin Used to Add User's Email to ActiveCampaign List. 6 * Version: 1.0. 06 * Version: 1.0.1 7 7 * Author: Bili Plugins 8 8 * Text Domain: ac-newsletter … … 22 22 * The version of the plugin. 23 23 */ 24 define( 'ACNS_VERSION', '1.0. 0' );24 define( 'ACNS_VERSION', '1.0.1' ); 25 25 } 26 26 … … 84 84 require ACNS_PATH . '/app/admin/class-activecampaign-newsletter-subscription-admin.php'; 85 85 require ACNS_PATH . '/app/main/class-activecampaign-newsletter-subscription.php'; 86 require ACNS_PATH . '/app/includes/common-functions.php'; -
activecampaign-newsletter-subscription/tags/1.0.1/app/admin/class-activecampaign-newsletter-subscription-admin.php
r2710566 r2719145 21 21 class Activecampaign_Newsletter_Subscription_Admin { 22 22 23 23 24 /** 24 25 * Constructor for class. 25 26 */ 26 27 public function __construct() { 27 28 28 // Create Admin Menu. 29 29 add_action( 'admin_menu', array( $this, 'acns_admin_menu' ) ); … … 38 38 */ 39 39 public function acns_admin_menu() { 40 41 40 add_menu_page( 42 41 esc_html__( 'Newsletter Subscription', 'ac-newsletter' ), … … 54 53 */ 55 54 public function acns_menu_callback() { 56 57 55 echo sprintf( 58 56 '<div class="warp"><h1>%s</h1></div>', … … 60 58 ); 61 59 ?> 62 63 <form method="post" action="" id=''> 60 <form method="post" action="" id="acns_form"> 64 61 <table class="form-table"> 65 62 <tbody> 66 63 <tr> 67 64 <th> 68 <label for="a pi"> <?php esc_html_e( 'Enter Your ActiveCampaign API URL', 'ac-newsletter' ); ?> </label>65 <label for="acns_api_url"> <?php esc_html_e( 'Enter Your ActiveCampaign API URL', 'ac-newsletter' ); ?> </label> 69 66 </th> 70 67 <td> 71 68 <?php $fetch_api_url = ! empty( get_option( 'acns_api_url' ) ) ? get_option( 'acns_api_url' ) : ''; ?> 72 <input name="a pi_url" id="api_url" type="text" class="regular-text" value="<?php echo esc_attr( $fetch_api_url ); ?>" placeholder="<?php esc_attr_e( 'https://youraccountname.api-us1.com', 'ac-newsletter' ); ?>" required>69 <input name="acns_api_url" id="acns_api_url" type="text" class="regular-text" value="<?php echo esc_attr( $fetch_api_url ); ?>" placeholder="<?php esc_attr_e( 'https://youraccountname.api-us1.com', 'ac-newsletter' ); ?>" required> 73 70 <p class="description" id="tagline-description"> 74 71 <?php esc_html_e( 'Enter ActiveCapmpaign API URL Here. Don\'t know What\'s this?', 'ac-newsletter' ); ?> … … 79 76 <tr> 80 77 <th> 81 <label for="a pi_key"> <?php esc_html_e( 'Enter Your ActiveCampaign API Key', 'ac-newsletter' ); ?> </label>78 <label for="acns_api_key"> <?php esc_html_e( 'Enter Your ActiveCampaign API Key', 'ac-newsletter' ); ?> </label> 82 79 </th> 83 80 <td> 84 <?php $fetch_api_key = ! empty( get_option( 'acns_api_key' ) ) ? get_option( 'acns_api_key') : ''; ?>85 <input name="a pi_key" id="api_key" type="password" class="regular-text" value="<?php echo esc_attr( $fetch_api_key ); ?>" required>81 <?php $fetch_api_key = ! empty( get_option( 'acns_api_key' ) ) ? base64_decode( get_option( 'acns_api_key' ) ) : ''; ?> 82 <input name="acns_api_key" id="acns_api_key" type="password" class="regular-text" value="<?php echo esc_attr( $fetch_api_key ); ?>" required> 86 83 <p class="description" id="tagline-description"> 87 84 <?php esc_html_e( 'Enter ActiveCapmpaign API Key Here. Don\'t know What\'s this?', 'ac-newsletter' ); ?> … … 92 89 <tr> 93 90 <th> 94 <label for=" list_id"> <?php esc_html_e( 'Enter List ID', 'ac-newsletter' ); ?> </label>91 <label for="acns_list_id"> <?php esc_html_e( 'Enter List ID', 'ac-newsletter' ); ?> </label> 95 92 </th> 96 93 <td> 97 94 <?php $fetch_list_id = ! empty( get_option( 'acns_list_id' ) ) ? get_option( 'acns_list_id' ) : ''; ?> 98 <input name=" list_id" id="list_id" type="number" step="1" min="1" class="small-text" value="<?php echo esc_attr( $fetch_list_id ); ?>">95 <input name="acns_list_id" id="acns_list_id" type="number" step="1" min="1" class="small-text" value="<?php echo esc_attr( $fetch_list_id ); ?>"> 99 96 <p class="description" id="tagline-description"> 100 97 <?php esc_html_e( 'Enter ActiveCapmpaign List ID Here, By Default Users will be added to "Contacts". Don\'t know What\'s this?', 'ac-newsletter' ); ?> … … 105 102 <tr> 106 103 <th> 107 <label for=" show_msg"> <?php esc_html_e( 'Enter Custom Text', 'ac-newsletter' ); ?> </label>104 <label for="acns_show_msg"> <?php esc_html_e( 'Enter Custom Text', 'ac-newsletter' ); ?> </label> 108 105 </th> 109 106 <td> 110 107 <?php $fetch_show_msg = ! empty( get_option( 'acns_show_msg' ) ) ? get_option( 'acns_show_msg' ) : ''; ?> 111 <input name=" show_msg" id="show_msg" type="text" class="regular-text" value="<?php echo esc_attr( $fetch_show_msg ); ?>">108 <input name="acns_show_msg" id="acns_show_msg" type="text" class="regular-text" value="<?php echo esc_attr( $fetch_show_msg ); ?>"> 112 109 <p class="description" id="tagline-description"> 113 110 <?php esc_html_e( 'Enter Text you Want to display on SignUp Page. Don\'t know What\'s this?', 'ac-newsletter' ); ?> … … 116 113 </td> 117 114 </tr> 118 <input type="hidden" name=" save" value="1">119 <?php wp_nonce_field( 'acns_nonce_action', 'acns_nonce' ); ?>115 <input type="hidden" name="acns_save" value="1"> 116 <?php wp_nonce_field( 'acns_nonce_action', 'acns_nonce' ); ?> 120 117 </tbody> 121 118 </table> 119 <?php do_action( 'acns_before_submit' ); ?> 122 120 <p class="submit"> 123 121 <input id="submitbtn" class="button button-primary" type="submit" /> 124 122 </p> 125 123 </form> 126 124 <div id="my-loader" class="ldld full em-1 d-inline-block dark ml-2"></div> 127 125 <?php 128 126 } … … 132 130 */ 133 131 public function acns_submit_data() { 134 135 $save = filter_input( INPUT_POST, 'save', FILTER_SANITIZE_NUMBER_INT ); 132 $save = filter_input( INPUT_POST, 'acns_save', FILTER_SANITIZE_NUMBER_INT ); 136 133 137 134 if ( empty( $save ) ) { … … 139 136 } 140 137 141 $api_url = filter_input( INPUT_POST, 'a pi_url', FILTER_SANITIZE_URL );142 $api_key = base64_encode( filter_input( INPUT_POST, 'a pi_key' ) );143 $list_id = filter_input( INPUT_POST, ' list_id', FILTER_SANITIZE_NUMBER_INT );144 $show_msg = filter_input( INPUT_POST, ' show_msg' );138 $api_url = filter_input( INPUT_POST, 'acns_api_url', FILTER_SANITIZE_URL ); 139 $api_key = base64_encode( filter_input( INPUT_POST, 'acns_api_key' ) ); 140 $list_id = filter_input( INPUT_POST, 'acns_list_id', FILTER_SANITIZE_NUMBER_INT ); 141 $show_msg = filter_input( INPUT_POST, 'acns_show_msg' ); 145 142 146 143 // Nonce Verification. … … 158 155 update_option( 'acns_show_msg', $show_msg ); 159 156 157 do_action( 'acns_submit_data' ); 158 160 159 // Display Admin Notice. 161 160 add_action( 'admin_notices', array( $this, 'acns_success_notice' ) ); … … 167 166 */ 168 167 public function acns_success_notice() { 169 170 168 echo sprintf( 171 169 '<div class="%1$s"><p>%2$s</p></div>', -
activecampaign-newsletter-subscription/tags/1.0.1/app/main/class-activecampaign-newsletter-subscription.php
r2710566 r2719145 32 32 // Store Checkbox Input data in database. 33 33 add_action( 'user_register', array( $this, 'acns_add_user_input' ) ); 34 34 35 } 35 36 … … 58 59 59 60 /** 60 * Store Checkbox Value To Database 61 * Store Checkbox Value To Database. 61 62 * 62 63 * @param int $user_id Get User ID. … … 80 81 if ( ! empty( $api_url ) && ! empty( $api_key ) ) { 81 82 82 // ActiveCampaign Add Contact API. 83 $url = $api_url . '/api/3/contact/sync'; 84 $body = array( 'contact' => array( 'email' => $email ) ); 85 $body = wp_json_encode( $body ); 86 87 $response = wp_remote_post( 88 esc_url_raw( $url ), 89 array( 90 'headers' => array( 91 'Api-Token' => $api_key, 92 ), 93 'body' => $body, 94 ) 95 ); 83 $response = acns_add_user( $email ); 96 84 97 85 if ( is_wp_error( $response ) ) { 98 99 86 // Store Error Log to User Meta. 100 87 $error_message = ! empty( $response->get_error_message() ) ? $response->get_error_message() : 'Unknown Error'; … … 111 98 if ( ! empty( $contact_id ) && ! empty( $list_id ) ) { 112 99 113 // ActiveCampaign Add Contact to List API. 114 $url = $api_url . '/api/3/contactLists'; 115 $body = array( 116 'contactList' => array( 117 'list' => $list_id, 118 'contact' => $contact_id, 119 'status' => '1', 120 ), 121 ); 122 $body = wp_json_encode( $body ); 123 124 $response = wp_remote_post( 125 esc_url_raw( $url ), 126 array( 127 'headers' => array( 128 'Api-Token' => $api_key, 129 ), 130 'body' => $body, 131 ) 132 ); 100 $response = acns_add_user_list( $list_id, $contact_id ); 133 101 134 102 if ( is_wp_error( $response ) ) { … … 147 115 } 148 116 } 149 150 117 } 151 118 } -
activecampaign-newsletter-subscription/tags/1.0.1/languages/default.pot
r2710566 r2719145 6 6 "Report-Msgid-Bugs-To: " 7 7 "https://wordpress.org/support/plugin/activecampaign-newsletter-subscription\n" 8 "POT-Creation-Date: 2022-04- 13 08:38:20+00:00\n"8 "POT-Creation-Date: 2022-04-23 10:44:09+00:00\n" 9 9 "MIME-Version: 1.0\n" 10 10 "Content-Type: text/plain; charset=utf-8\n" … … 30 30 msgstr "" 31 31 32 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:4 233 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:4 332 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:45 33 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:46 34 34 msgid "Newsletter Subscription" 35 35 msgstr "" 36 36 37 #: app/admin/class-activecampaign-newsletter-subscription-admin.php: 5937 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:63 38 38 msgid "Activecampaign Newsletter Subscription." 39 39 msgstr "" 40 40 41 #: app/admin/class-activecampaign-newsletter-subscription-admin.php: 6841 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:71 42 42 msgid "Enter Your ActiveCampaign API URL" 43 43 msgstr "" 44 44 45 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:7 245 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:75 46 46 msgid "https://youraccountname.api-us1.com" 47 47 msgstr "" 48 48 49 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:7 449 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:77 50 50 msgid "Enter ActiveCapmpaign API URL Here. Don't know What's this?" 51 51 msgstr "" 52 52 53 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:7 554 #: app/admin/class-activecampaign-newsletter-subscription-admin.php: 8855 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:10 156 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:11 453 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:78 54 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:91 55 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:104 56 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:117 57 57 msgid "Click Here" 58 58 msgstr "" 59 59 60 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:8 160 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:84 61 61 msgid "Enter Your ActiveCampaign API Key" 62 62 msgstr "" 63 63 64 #: app/admin/class-activecampaign-newsletter-subscription-admin.php: 8764 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:90 65 65 msgid "Enter ActiveCapmpaign API Key Here. Don't know What's this?" 66 66 msgstr "" 67 67 68 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:9 468 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:97 69 69 msgid "Enter List ID" 70 70 msgstr "" 71 71 72 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:10 072 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:103 73 73 msgid "" 74 74 "Enter ActiveCapmpaign List ID Here, By Default Users will be added to " … … 76 76 msgstr "" 77 77 78 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:1 0778 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:110 79 79 msgid "Enter Custom Text" 80 80 msgstr "" 81 81 82 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:11 382 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:116 83 83 msgid "Enter Text you Want to display on SignUp Page. Don't know What's this?" 84 84 msgstr "" 85 85 86 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:15 086 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:155 87 87 msgid "Invalid Submission" 88 88 msgstr "" 89 89 90 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:1 7390 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:181 91 91 msgid "Settings Saved" 92 92 msgstr "" 93 93 94 #: app/main/class-activecampaign-newsletter-subscription.php:5 094 #: app/main/class-activecampaign-newsletter-subscription.php:51 95 95 msgid "Subscribe For Newsletter" 96 96 msgstr "" -
activecampaign-newsletter-subscription/tags/1.0.1/readme.txt
r2710568 r2719145 1 1 === ActiveCampaign Newsletter Subscription === 2 Contributors: bhargavbhandari90, hackkzy404, biliplugins 3 Donate link: https://www.paypal.me/BnB90/10 4 Tags: activecampaign, newsletter, newsletter subscription, active campaign 5 Requires at least: 4.0 2 Contributors: bhargavbhandari90, hackkzy404 3 Tags: activecampaign, newsletter, newsletter subscription, active campaign 4 Requires at least: 4.0 6 5 Tested up to: 5.9.3 7 Requires PHP: 5.6 8 Stable Tag: 1.0. 06 Requires PHP: 5.6 7 Stable Tag: 1.0.1 9 8 License: GPLv2 or later 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 10 12 11 === Description === 13 12 14 13 This is Newsletter Subscription Plugin, Which is used to add users to Selected ActiveCampaign List. 14 15 === Pro Features === 16 17 - Supports thirdparty Plugins 18 - This pro plugin has compatibility with the following plugins: 19 1. Buddypress 20 2. WooCommerce 21 - Get ActiveCampaign Newsletter Subscription Pro(https://buntywp.gumroad.com/l/dxitz) 15 22 16 23 === How to use? === … … 26 33 27 34 === Installation === 28 1. Upload "activecampaign-newsletter-subscription" to the "/wp-content/plugins/" directory us ong FTP or upload plugin zip using upload button.35 1. Upload "activecampaign-newsletter-subscription" to the "/wp-content/plugins/" directory using FTP or upload plugin zip using upload button. 29 36 2. Activate the plugin through the "Plugins" menu in WordPress. 30 37 31 == Screenshots == 32 1. Add Custom Text If you Want, This text will display on SignUP Page with Checkbox screenshot-1.png. 33 2. If user select This Checkbox, than user will be added to ActiveCampaign screenshot-2.png. 34 3. User will be added to ActiveCampaign List screenshot-3.png. 38 === Changelog === 35 39 36 === Changelog === 37 = 1.0.0 = 40 === 1.0.1 === 41 * Compatibility with pro plugin. 42 === 1.0.0 === 38 43 * Initial release. -
activecampaign-newsletter-subscription/trunk/README.md
r2710568 r2719145 1 1 # ActiveCampaign Newsletter Subscription # 2 - **Contributors:** bhargavbhandari90, hackkzy404, biliplugins 3 - **Donate link:** https://www.paypal.me/BnB90/10 2 - **Contributors:** bhargavbhandari90, hackkzy404 4 3 - **Tags:** activecampaign, newsletter, newsletter subscription, active campaign 5 4 - **Requires at least:** 4.0 6 5 - **Tested up to:** 5.9.3 7 6 - **Requires PHP:** 5.6 8 - **Stable Tag:** 1.0. 07 - **Stable Tag:** 1.0.1 9 8 - **License:** GPLv2 or later 10 9 - **License URI:** http://www.gnu.org/licenses/gpl-2.0.html … … 14 13 This is Newsletter Subscription Plugin, Which is used to add users to Selected ActiveCampaign List. 15 14 16 https://youtu.be/VeHCBy9Gv5A 15 ## Pro Features ## 16 17 - Supports thirdparty Plugins 18 - This pro plugin has compatibility with the following plugins: 19 1. *Buddypress* 20 2. *WooCommerce* 21 > [Get ActiveCampaign Newsletter Subscription Pro](https://buntywp.gumroad.com/l/dxitz) 17 22 18 23 ## How to use? ## … … 39 44 </p> 40 45 46 ## How to Configure? ## 47 https://youtu.be/VeHCBy9Gv5A 48 41 49 ## Installation ## 42 1. Upload "activecampaign-newsletter-subscription" to the "/wp-content/plugins/" directory us ong FTP or upload plugin zip using upload button.50 1. Upload "activecampaign-newsletter-subscription" to the "/wp-content/plugins/" directory using FTP or upload plugin zip using upload button. 43 51 2. Activate the plugin through the "Plugins" menu in WordPress. 44 52 45 53 ## Changelog ## 46 54 55 ### 1.0.1 ### 56 * Compatibility with pro plugin. 47 57 ### 1.0.0 ### 48 58 * Initial release. -
activecampaign-newsletter-subscription/trunk/activecampaign-newsletter-subscription.php
r2710566 r2719145 4 4 * Plugin URI: https://bhargavb.com/ 5 5 * Description: This Plugin Used to Add User's Email to ActiveCampaign List. 6 * Version: 1.0. 06 * Version: 1.0.1 7 7 * Author: Bili Plugins 8 8 * Text Domain: ac-newsletter … … 22 22 * The version of the plugin. 23 23 */ 24 define( 'ACNS_VERSION', '1.0. 0' );24 define( 'ACNS_VERSION', '1.0.1' ); 25 25 } 26 26 … … 84 84 require ACNS_PATH . '/app/admin/class-activecampaign-newsletter-subscription-admin.php'; 85 85 require ACNS_PATH . '/app/main/class-activecampaign-newsletter-subscription.php'; 86 require ACNS_PATH . '/app/includes/common-functions.php'; -
activecampaign-newsletter-subscription/trunk/app/admin/class-activecampaign-newsletter-subscription-admin.php
r2710566 r2719145 21 21 class Activecampaign_Newsletter_Subscription_Admin { 22 22 23 23 24 /** 24 25 * Constructor for class. 25 26 */ 26 27 public function __construct() { 27 28 28 // Create Admin Menu. 29 29 add_action( 'admin_menu', array( $this, 'acns_admin_menu' ) ); … … 38 38 */ 39 39 public function acns_admin_menu() { 40 41 40 add_menu_page( 42 41 esc_html__( 'Newsletter Subscription', 'ac-newsletter' ), … … 54 53 */ 55 54 public function acns_menu_callback() { 56 57 55 echo sprintf( 58 56 '<div class="warp"><h1>%s</h1></div>', … … 60 58 ); 61 59 ?> 62 63 <form method="post" action="" id=''> 60 <form method="post" action="" id="acns_form"> 64 61 <table class="form-table"> 65 62 <tbody> 66 63 <tr> 67 64 <th> 68 <label for="a pi"> <?php esc_html_e( 'Enter Your ActiveCampaign API URL', 'ac-newsletter' ); ?> </label>65 <label for="acns_api_url"> <?php esc_html_e( 'Enter Your ActiveCampaign API URL', 'ac-newsletter' ); ?> </label> 69 66 </th> 70 67 <td> 71 68 <?php $fetch_api_url = ! empty( get_option( 'acns_api_url' ) ) ? get_option( 'acns_api_url' ) : ''; ?> 72 <input name="a pi_url" id="api_url" type="text" class="regular-text" value="<?php echo esc_attr( $fetch_api_url ); ?>" placeholder="<?php esc_attr_e( 'https://youraccountname.api-us1.com', 'ac-newsletter' ); ?>" required>69 <input name="acns_api_url" id="acns_api_url" type="text" class="regular-text" value="<?php echo esc_attr( $fetch_api_url ); ?>" placeholder="<?php esc_attr_e( 'https://youraccountname.api-us1.com', 'ac-newsletter' ); ?>" required> 73 70 <p class="description" id="tagline-description"> 74 71 <?php esc_html_e( 'Enter ActiveCapmpaign API URL Here. Don\'t know What\'s this?', 'ac-newsletter' ); ?> … … 79 76 <tr> 80 77 <th> 81 <label for="a pi_key"> <?php esc_html_e( 'Enter Your ActiveCampaign API Key', 'ac-newsletter' ); ?> </label>78 <label for="acns_api_key"> <?php esc_html_e( 'Enter Your ActiveCampaign API Key', 'ac-newsletter' ); ?> </label> 82 79 </th> 83 80 <td> 84 <?php $fetch_api_key = ! empty( get_option( 'acns_api_key' ) ) ? get_option( 'acns_api_key') : ''; ?>85 <input name="a pi_key" id="api_key" type="password" class="regular-text" value="<?php echo esc_attr( $fetch_api_key ); ?>" required>81 <?php $fetch_api_key = ! empty( get_option( 'acns_api_key' ) ) ? base64_decode( get_option( 'acns_api_key' ) ) : ''; ?> 82 <input name="acns_api_key" id="acns_api_key" type="password" class="regular-text" value="<?php echo esc_attr( $fetch_api_key ); ?>" required> 86 83 <p class="description" id="tagline-description"> 87 84 <?php esc_html_e( 'Enter ActiveCapmpaign API Key Here. Don\'t know What\'s this?', 'ac-newsletter' ); ?> … … 92 89 <tr> 93 90 <th> 94 <label for=" list_id"> <?php esc_html_e( 'Enter List ID', 'ac-newsletter' ); ?> </label>91 <label for="acns_list_id"> <?php esc_html_e( 'Enter List ID', 'ac-newsletter' ); ?> </label> 95 92 </th> 96 93 <td> 97 94 <?php $fetch_list_id = ! empty( get_option( 'acns_list_id' ) ) ? get_option( 'acns_list_id' ) : ''; ?> 98 <input name=" list_id" id="list_id" type="number" step="1" min="1" class="small-text" value="<?php echo esc_attr( $fetch_list_id ); ?>">95 <input name="acns_list_id" id="acns_list_id" type="number" step="1" min="1" class="small-text" value="<?php echo esc_attr( $fetch_list_id ); ?>"> 99 96 <p class="description" id="tagline-description"> 100 97 <?php esc_html_e( 'Enter ActiveCapmpaign List ID Here, By Default Users will be added to "Contacts". Don\'t know What\'s this?', 'ac-newsletter' ); ?> … … 105 102 <tr> 106 103 <th> 107 <label for=" show_msg"> <?php esc_html_e( 'Enter Custom Text', 'ac-newsletter' ); ?> </label>104 <label for="acns_show_msg"> <?php esc_html_e( 'Enter Custom Text', 'ac-newsletter' ); ?> </label> 108 105 </th> 109 106 <td> 110 107 <?php $fetch_show_msg = ! empty( get_option( 'acns_show_msg' ) ) ? get_option( 'acns_show_msg' ) : ''; ?> 111 <input name=" show_msg" id="show_msg" type="text" class="regular-text" value="<?php echo esc_attr( $fetch_show_msg ); ?>">108 <input name="acns_show_msg" id="acns_show_msg" type="text" class="regular-text" value="<?php echo esc_attr( $fetch_show_msg ); ?>"> 112 109 <p class="description" id="tagline-description"> 113 110 <?php esc_html_e( 'Enter Text you Want to display on SignUp Page. Don\'t know What\'s this?', 'ac-newsletter' ); ?> … … 116 113 </td> 117 114 </tr> 118 <input type="hidden" name=" save" value="1">119 <?php wp_nonce_field( 'acns_nonce_action', 'acns_nonce' ); ?>115 <input type="hidden" name="acns_save" value="1"> 116 <?php wp_nonce_field( 'acns_nonce_action', 'acns_nonce' ); ?> 120 117 </tbody> 121 118 </table> 119 <?php do_action( 'acns_before_submit' ); ?> 122 120 <p class="submit"> 123 121 <input id="submitbtn" class="button button-primary" type="submit" /> 124 122 </p> 125 123 </form> 126 124 <div id="my-loader" class="ldld full em-1 d-inline-block dark ml-2"></div> 127 125 <?php 128 126 } … … 132 130 */ 133 131 public function acns_submit_data() { 134 135 $save = filter_input( INPUT_POST, 'save', FILTER_SANITIZE_NUMBER_INT ); 132 $save = filter_input( INPUT_POST, 'acns_save', FILTER_SANITIZE_NUMBER_INT ); 136 133 137 134 if ( empty( $save ) ) { … … 139 136 } 140 137 141 $api_url = filter_input( INPUT_POST, 'a pi_url', FILTER_SANITIZE_URL );142 $api_key = base64_encode( filter_input( INPUT_POST, 'a pi_key' ) );143 $list_id = filter_input( INPUT_POST, ' list_id', FILTER_SANITIZE_NUMBER_INT );144 $show_msg = filter_input( INPUT_POST, ' show_msg' );138 $api_url = filter_input( INPUT_POST, 'acns_api_url', FILTER_SANITIZE_URL ); 139 $api_key = base64_encode( filter_input( INPUT_POST, 'acns_api_key' ) ); 140 $list_id = filter_input( INPUT_POST, 'acns_list_id', FILTER_SANITIZE_NUMBER_INT ); 141 $show_msg = filter_input( INPUT_POST, 'acns_show_msg' ); 145 142 146 143 // Nonce Verification. … … 158 155 update_option( 'acns_show_msg', $show_msg ); 159 156 157 do_action( 'acns_submit_data' ); 158 160 159 // Display Admin Notice. 161 160 add_action( 'admin_notices', array( $this, 'acns_success_notice' ) ); … … 167 166 */ 168 167 public function acns_success_notice() { 169 170 168 echo sprintf( 171 169 '<div class="%1$s"><p>%2$s</p></div>', -
activecampaign-newsletter-subscription/trunk/app/main/class-activecampaign-newsletter-subscription.php
r2710566 r2719145 32 32 // Store Checkbox Input data in database. 33 33 add_action( 'user_register', array( $this, 'acns_add_user_input' ) ); 34 34 35 } 35 36 … … 58 59 59 60 /** 60 * Store Checkbox Value To Database 61 * Store Checkbox Value To Database. 61 62 * 62 63 * @param int $user_id Get User ID. … … 80 81 if ( ! empty( $api_url ) && ! empty( $api_key ) ) { 81 82 82 // ActiveCampaign Add Contact API. 83 $url = $api_url . '/api/3/contact/sync'; 84 $body = array( 'contact' => array( 'email' => $email ) ); 85 $body = wp_json_encode( $body ); 86 87 $response = wp_remote_post( 88 esc_url_raw( $url ), 89 array( 90 'headers' => array( 91 'Api-Token' => $api_key, 92 ), 93 'body' => $body, 94 ) 95 ); 83 $response = acns_add_user( $email ); 96 84 97 85 if ( is_wp_error( $response ) ) { 98 99 86 // Store Error Log to User Meta. 100 87 $error_message = ! empty( $response->get_error_message() ) ? $response->get_error_message() : 'Unknown Error'; … … 111 98 if ( ! empty( $contact_id ) && ! empty( $list_id ) ) { 112 99 113 // ActiveCampaign Add Contact to List API. 114 $url = $api_url . '/api/3/contactLists'; 115 $body = array( 116 'contactList' => array( 117 'list' => $list_id, 118 'contact' => $contact_id, 119 'status' => '1', 120 ), 121 ); 122 $body = wp_json_encode( $body ); 123 124 $response = wp_remote_post( 125 esc_url_raw( $url ), 126 array( 127 'headers' => array( 128 'Api-Token' => $api_key, 129 ), 130 'body' => $body, 131 ) 132 ); 100 $response = acns_add_user_list( $list_id, $contact_id ); 133 101 134 102 if ( is_wp_error( $response ) ) { … … 147 115 } 148 116 } 149 150 117 } 151 118 } -
activecampaign-newsletter-subscription/trunk/languages/default.pot
r2710566 r2719145 6 6 "Report-Msgid-Bugs-To: " 7 7 "https://wordpress.org/support/plugin/activecampaign-newsletter-subscription\n" 8 "POT-Creation-Date: 2022-04- 13 08:38:20+00:00\n"8 "POT-Creation-Date: 2022-04-23 10:44:09+00:00\n" 9 9 "MIME-Version: 1.0\n" 10 10 "Content-Type: text/plain; charset=utf-8\n" … … 30 30 msgstr "" 31 31 32 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:4 233 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:4 332 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:45 33 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:46 34 34 msgid "Newsletter Subscription" 35 35 msgstr "" 36 36 37 #: app/admin/class-activecampaign-newsletter-subscription-admin.php: 5937 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:63 38 38 msgid "Activecampaign Newsletter Subscription." 39 39 msgstr "" 40 40 41 #: app/admin/class-activecampaign-newsletter-subscription-admin.php: 6841 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:71 42 42 msgid "Enter Your ActiveCampaign API URL" 43 43 msgstr "" 44 44 45 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:7 245 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:75 46 46 msgid "https://youraccountname.api-us1.com" 47 47 msgstr "" 48 48 49 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:7 449 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:77 50 50 msgid "Enter ActiveCapmpaign API URL Here. Don't know What's this?" 51 51 msgstr "" 52 52 53 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:7 554 #: app/admin/class-activecampaign-newsletter-subscription-admin.php: 8855 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:10 156 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:11 453 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:78 54 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:91 55 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:104 56 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:117 57 57 msgid "Click Here" 58 58 msgstr "" 59 59 60 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:8 160 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:84 61 61 msgid "Enter Your ActiveCampaign API Key" 62 62 msgstr "" 63 63 64 #: app/admin/class-activecampaign-newsletter-subscription-admin.php: 8764 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:90 65 65 msgid "Enter ActiveCapmpaign API Key Here. Don't know What's this?" 66 66 msgstr "" 67 67 68 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:9 468 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:97 69 69 msgid "Enter List ID" 70 70 msgstr "" 71 71 72 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:10 072 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:103 73 73 msgid "" 74 74 "Enter ActiveCapmpaign List ID Here, By Default Users will be added to " … … 76 76 msgstr "" 77 77 78 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:1 0778 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:110 79 79 msgid "Enter Custom Text" 80 80 msgstr "" 81 81 82 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:11 382 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:116 83 83 msgid "Enter Text you Want to display on SignUp Page. Don't know What's this?" 84 84 msgstr "" 85 85 86 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:15 086 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:155 87 87 msgid "Invalid Submission" 88 88 msgstr "" 89 89 90 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:1 7390 #: app/admin/class-activecampaign-newsletter-subscription-admin.php:181 91 91 msgid "Settings Saved" 92 92 msgstr "" 93 93 94 #: app/main/class-activecampaign-newsletter-subscription.php:5 094 #: app/main/class-activecampaign-newsletter-subscription.php:51 95 95 msgid "Subscribe For Newsletter" 96 96 msgstr "" -
activecampaign-newsletter-subscription/trunk/readme.txt
r2710568 r2719145 1 1 === ActiveCampaign Newsletter Subscription === 2 Contributors: bhargavbhandari90, hackkzy404, biliplugins 3 Donate link: https://www.paypal.me/BnB90/10 4 Tags: activecampaign, newsletter, newsletter subscription, active campaign 5 Requires at least: 4.0 2 Contributors: bhargavbhandari90, hackkzy404 3 Tags: activecampaign, newsletter, newsletter subscription, active campaign 4 Requires at least: 4.0 6 5 Tested up to: 5.9.3 7 Requires PHP: 5.6 8 Stable Tag: 1.0. 06 Requires PHP: 5.6 7 Stable Tag: 1.0.1 9 8 License: GPLv2 or later 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 10 12 11 === Description === 13 12 14 13 This is Newsletter Subscription Plugin, Which is used to add users to Selected ActiveCampaign List. 14 15 === Pro Features === 16 17 - Supports thirdparty Plugins 18 - This pro plugin has compatibility with the following plugins: 19 1. Buddypress 20 2. WooCommerce 21 - Get ActiveCampaign Newsletter Subscription Pro(https://buntywp.gumroad.com/l/dxitz) 15 22 16 23 === How to use? === … … 26 33 27 34 === Installation === 28 1. Upload "activecampaign-newsletter-subscription" to the "/wp-content/plugins/" directory us ong FTP or upload plugin zip using upload button.35 1. Upload "activecampaign-newsletter-subscription" to the "/wp-content/plugins/" directory using FTP or upload plugin zip using upload button. 29 36 2. Activate the plugin through the "Plugins" menu in WordPress. 30 37 31 == Screenshots == 32 1. Add Custom Text If you Want, This text will display on SignUP Page with Checkbox screenshot-1.png. 33 2. If user select This Checkbox, than user will be added to ActiveCampaign screenshot-2.png. 34 3. User will be added to ActiveCampaign List screenshot-3.png. 38 === Changelog === 35 39 36 === Changelog === 37 = 1.0.0 = 40 === 1.0.1 === 41 * Compatibility with pro plugin. 42 === 1.0.0 === 38 43 * Initial release.
Note: See TracChangeset
for help on using the changeset viewer.