Changeset 3078519
- Timestamp:
- 04/29/2024 08:52:41 AM (22 months ago)
- Location:
- pinpointe-form-integration/trunk
- Files:
-
- 7 edited
-
includes/pinpointe-form.inc.php (modified) (1 diff)
-
includes/pinpointe-plugin-structure.inc.php (modified) (1 diff)
-
includes/pinpointe-prepare-form.inc.php (modified) (2 diffs)
-
includes/pinpointe-service.class.php (modified) (2 diffs)
-
includes/pinpointe-widget.class.php (modified) (1 diff)
-
pinpointe-signup-form.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pinpointe-form-integration/trunk/includes/pinpointe-form.inc.php
r3070994 r3078519 29 29 } 30 30 } 31 32 ?> -
pinpointe-form-integration/trunk/includes/pinpointe-plugin-structure.inc.php
r3070994 r3078519 608 608 } 609 609 } 610 611 ?> -
pinpointe-form-integration/trunk/includes/pinpointe-prepare-form.inc.php
r3074988 r3078519 250 250 // Title 251 251 if ($is_popup) { 252 $html .= '<header>' . $title . '</header><i id="pinpointe_popup_close" class="icon-append fa- times" style="padding:10px 10px 0 0;cursor:pointer;"></i>';252 $html .= '<header>' . $title . '</header><i id="pinpointe_popup_close" class="icon-append fa-regular fa-circle-xmark" style="padding:10px 10px 0 0;cursor:pointer;"></i>'; 253 253 } 254 254 else if (!empty($title)) { … … 551 551 } 552 552 } 553 554 ?> -
pinpointe-form-integration/trunk/includes/pinpointe-service.class.php
r3073079 r3078519 127 127 128 128 $response = wp_remote_post($this->apiUrl, $args); 129 129 130 $responseBody = wp_remote_retrieve_body($response); 131 130 132 if (is_wp_error($response) || wp_remote_retrieve_response_code($response) !== 200) { 133 134 if (is_array($response)) { 135 136 $error_data = !$is_json ? json_encode($responseBody) : $responseBody; 137 138 $error_message = reset(json_decode($error_data, true)['errormessage']); 139 } else { 140 $error_message = $response->get_error_message(); 141 } 142 131 143 throw new \Exception( 132 sprintf('API call of type %s failed: %s', $type , $ response->get_error_message())144 sprintf('API call of type %s failed: %s', $type , $error_message) 133 145 ); 134 146 } 135 136 $responseBody = wp_remote_retrieve_body($response);137 147 138 148 $response = $is_json ? json_decode($responseBody) : simplexml_load_string($responseBody); 139 149 140 if ($response->status == 'SUCCESS') {150 if ($response->status === 'SUCCESS') { 141 151 if (isset($data['id']) && $data['id'] == '-999') { 142 152 return true; 143 153 } 144 154 return $this->xmlToArray($response->data); 145 } 146 else { 147 throw new \Exception(sprintf('There was a problem: %s', $responseBody)); 148 } 155 } 156 157 throw new \Exception(sprintf('There was a problem: %s', $responseBody)); 149 158 } 150 159 … … 342 351 */ 343 352 public function lists_subscribe($id, $email, $merge_vars = array(), $email_type = 'html', 344 $add_to_autoresponders = false, $update_existing = false, $tag_ids , $send_confirmation = false, $custom_data = []) {353 $add_to_autoresponders = false, $update_existing = false, $tag_ids = [], $send_confirmation = false, $custom_data = []) { 345 354 if(!is_string($email)) { 346 355 $email = $email['email']; -
pinpointe-form-integration/trunk/includes/pinpointe-widget.class.php
r3065401 r3078519 154 154 } 155 155 } 156 157 ?> -
pinpointe-form-integration/trunk/pinpointe-signup-form.php
r3077542 r3078519 4 4 * Plugin URI: https://help.pinpointe.com/support/solutions/articles/5000664320-wordpress-plugin-download 5 5 * Description: Add Pinpointe forms to your WordPress site 6 * Version: 1. 66 * Version: 1.7 7 7 * Author: Pinpointe 8 8 * Author URI: http://www.pinpointe.com/ … … 3131 3131 return $results; 3132 3132 } 3133 else { 3134 return true; 3135 } 3133 3134 return true; 3136 3135 } 3137 3136 catch (Exception $e) { … … 4693 4692 4694 4693 $GLOBALS['PinpointeSignupForm'] = PinpointeSignupForm::get_instance(); 4695 4696 ?> -
pinpointe-form-integration/trunk/readme.txt
r3075038 r3078519 4 4 Requires at least: 3.5 5 5 Tested up to: 6.4.2 6 Stable tag: 1. 66 Stable tag: 1.7 7 7 Requires PHP: 5.4 8 8 License: GPLv3 or later … … 60 60 61 61 == Changelog == 62 1.7 63 * Replace deprecated Jquery chosen plugin with Tom Select. 64 * Update Font Awesome 4 to Font Awesome 6 65 * Fixed undefined method get_error_message() on array when making a request using wp_remote_post 66 * Fixed popup modal not showing on frontend pages. 67 * Upgrade dependencies to their latest versions. 68 * Add nonce to all ajax handlers. 69 * Ensure a mailing list is selected on both admin and frontend 70 62 71 1.6 63 72 * Added ability to display multiple mailing lists on the subscription form
Note: See TracChangeset
for help on using the changeset viewer.