Changeset 2726861
- Timestamp:
- 05/19/2022 01:44:30 PM (4 years ago)
- Location:
- cloudtables/trunk
- Files:
-
- 4 edited
-
Api.php (modified) (6 diffs)
-
cloudtables.php (modified) (2 diffs)
-
package.json (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cloudtables/trunk/Api.php
r2324965 r2726861 16 16 private $_clientName = null; 17 17 private $_accessToken = null; 18 private $_conditions = null; 18 19 19 20 /** … … 62 63 $this->_clientName = $options['clientName']; 63 64 } 65 66 if ($options && isset($options['conditions'])) { 67 $this->_conditions = $options['conditions']; 68 } 64 69 } 65 70 … … 110 115 return $json['token']; 111 116 } 117 } 118 119 /** 120 * Set conditions 121 */ 122 public function conditions($cond) { 123 $this->_conditions = $cond; 124 125 return $this; 112 126 } 113 127 … … 190 204 } 191 205 206 if ($this->_conditions) { 207 $data['conditions'] = $this->_conditions; 208 } 209 192 210 if ($method === 'get') { 193 211 $response = wp_remote_get( $url, [ … … 204 222 205 223 $result = wp_remote_retrieve_body($response); 206 return json_decode($result, true); 224 $json = json_decode($result, true); 225 226 if (! $json['success']) { 227 echo 'Warning - CloudTables error: ' . json_encode($json['errors']); 228 } 229 return $json; 207 230 } 208 231 … … 217 240 } 218 241 } 242 -
cloudtables/trunk/cloudtables.php
r2324965 r2726861 272 272 273 273 $api = $this->_api_inst($key); 274 275 if (isset($attrs['conditions'])) { 276 $api->conditions($attrs['conditions']); 277 } 274 278 275 279 wp_register_style( … … 404 408 register_deactivation_hook( __FILE__, 'CloudTables::deactivate' ); 405 409 register_uninstall_hook( __FILE__, 'CloudTables::uninstall' ); 410 -
cloudtables/trunk/package.json
r2324965 r2726861 1 1 { 2 2 "name": "cloudtables-wordpress", 3 "version": "1. 0.0",3 "version": "1.1.0", 4 4 "description": "CloudTables easy integration plug-in for WordPress", 5 5 "main": "block.js", -
cloudtables/trunk/readme.txt
r2324965 r2726861 2 2 Tags: CloudTables, DataTables, Editor, SpryMedia 3 3 Requires at least: 5.0 4 Tested up to: 5. 45 Stable tag: 1. 0.04 Tested up to: 5.9 5 Stable tag: 1.1.0 6 6 Requires PHP: 5.5.0 7 7 License: GPLv2 or later … … 49 49 == Changelog == 50 50 51 = 1.1.0 - 19 May 2022 = 52 53 * Add support for `conditions` in short tag 54 51 55 = 1.0.0 - 22 May 2020 = 52 56
Note: See TracChangeset
for help on using the changeset viewer.