Changeset 2711276
- Timestamp:
- 04/18/2022 10:41:14 PM (4 years ago)
- Location:
- wp-emfluence/trunk
- Files:
-
- 4 edited
-
admin.php (modified) (2 diffs)
-
emfluence.php (modified) (1 diff)
-
libraries/emfl_platform_api/api.class.inc (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-emfluence/trunk/admin.php
r2225635 r2711276 92 92 function _emfluence_emailer_options_api_key_element(){ 93 93 $options = get_option('emfluence_global'); 94 if(empty($options) || !is_string($options['api_key'])) $options = array('api_key' => ''); 94 95 echo "<input id='api_key' name='emfluence_global[api_key]' size='36' type='text' value='{$options['api_key']}' />"; 95 96 } … … 97 98 function _emfluence_emailer_options_blacklist_domains_element(){ 98 99 $options = get_option('emfluence_global'); 100 if(!is_array($options)) $options = array(); 99 101 if(!array_key_exists('blacklist_domains', $options)) $options['blacklist_domains'] = ''; 100 102 echo " -
wp-emfluence/trunk/emfluence.php
r2549274 r2711276 5 5 Description: Easily add forms to your website for contacts to add or update their details in your emfluence Marketing Platform account. 6 6 Author: emfluence Digital Marketing 7 Version: 2.1 17 Version: 2.12 8 8 Author URI: https://www.emfluence.com 9 9 Text Domain: emfl_form -
wp-emfluence/trunk/libraries/emfl_platform_api/api.class.inc
r1919566 r2711276 100 100 // make the call with the best request handler available 101 101 $url = self::API_URL . '/' . $endpoint; 102 $params['accessToken'] = $this->access_token;103 102 104 103 if( function_exists('drupal_http_request') && defined('VERSION') ) { … … 108 107 $url, 109 108 array( 110 'headers' => array( 'Content-Type' => 'application/json' ), 109 'headers' => array( 110 'Content-Type' => 'application/json', 111 'Authorization' => 'Bearer ' . $this->access_token 112 ), 111 113 'method' => 'POST', 112 114 'data' => json_encode( (object) $params), … … 117 119 $response = drupal_http_request( 118 120 $url, 119 array( 'Content-Type' => 'application/json' ), 121 array( 122 'Content-Type' => 'application/json', 123 'Authorization' => 'Bearer ' . $this->access_token 124 ), 120 125 'POST', 121 126 json_encode( (object) $params), … … 131 136 array( 132 137 'timeout' => $this->timeout, 133 'headers' => array( 'Content-Type' => 'application/json' ), 138 'headers' => array( 139 'Content-Type' => 'application/json', 140 'Authorization' => 'Bearer ' . $this->access_token, 141 ), 134 142 'body' => json_encode( (object) $params ) 135 143 ) … … 149 157 // Fall back on CURL 150 158 $curl = curl_init($url); 159 $authorization = 'Bearer ' . $this->access_token; 160 151 161 curl_setopt($curl, CURLOPT_HEADER, false); 152 162 curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 153 curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: application/json")); 163 curl_setopt($curl, CURLOPT_HTTPHEADER, array( 164 "Content-type: application/json", 165 "Authorization: $authorization" 166 )); 154 167 curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 2); 155 168 curl_setopt($curl, CURLOPT_TIMEOUT, $this->timeout); -
wp-emfluence/trunk/readme.txt
r2549274 r2711276 2 2 Tags: email, email marketing, emailmarketing, emfluence, api, marketing automation, widget, email widget, email signup, mailing list, newsletter, form, automation 3 3 Requires at least: 4.0 4 Tested up to: 5. 7.25 Stable tag: 2.1 14 Tested up to: 5.9.3 5 Stable tag: 2.12 6 6 Requires PHP: 5.6 7 7 Contributors: emfluencekc, mightyturtle … … 57 57 58 58 == Changelog == 59 60 = 2.12 = 61 * Update platform authorization method 59 62 60 63 = 2.11 =
Note: See TracChangeset
for help on using the changeset viewer.