Changeset 2126721
- Timestamp:
- 07/22/2019 02:48:05 PM (7 years ago)
- Location:
- canvasflow/trunk
- Files:
-
- 4 edited
-
README.md (modified) (4 diffs)
-
canvasflow-plugin.php (modified) (3 diffs)
-
includes/canvasflow-api.php (modified) (15 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
canvasflow/trunk/README.md
r2057696 r2126721 27 27 28 28 #### Requirements 29 * WordPress 4.2 +29 * WordPress 5.2.2 + 30 30 * PHP 5.4 or higher (7.x recommended) 31 31 * MySQL 5.0 or higher … … 78 78 79 79 #### Changelog 80 ##### 1.5. 281 * Works with wordpress 5.1.180 ##### 1.5.3 81 * Added support for new API syntax 82 82 83 83 ##### 1.5.0 … … 185 185 186 186 #### Upgrade Notice 187 188 ##### 1.5.2 189 * Works with wordpress 5.1.1 187 ##### 1.5.3 188 * Added support for new API syntax 190 189 191 190 ##### 1.5.0 … … 263 262 * Users can specify to which issue an post is going to be published 264 263 265 #### 0.10.0264 ##### 0.10.0 266 265 * Added support for WordPress Shortcodes 267 266 -
canvasflow/trunk/canvasflow-plugin.php
r2025423 r2126721 3 3 Plugin Name: Canvasflow for WordPress 4 4 Description: This out-of-the-box connector provides a quick and simple way to push your blog content directly to an existing Canvasflow publication. 5 Version: 1.5. 25 Version: 1.5.3 6 6 Developer: Canvasflow 7 7 Developer URI: https://canvasflow.io … … 38 38 class WP_Canvasflow{ 39 39 private $wpdb; 40 public static $version = "1.5. 2";40 public static $version = "1.5.3"; 41 41 private $canvasflow_db; 42 42 private $canvasflow_tables_names; … … 44 44 function __construct() { 45 45 $this->wpdb = $GLOBALS['wpdb']; 46 $this->version = "1.5.2"; 46 47 $this->canvasflow_db = new Canvasflow_DB(); 47 48 -
canvasflow/trunk/includes/canvasflow-api.php
r2025423 r2126721 3 3 require_once(realpath(dirname(__FILE__) . '/..').'/canvasflow-plugin.php'); 4 4 class Canvasflow_Api { 5 private $base_url = 'https://api.canvasflow.io/v1/index.cfm';6 5 public $domain = 'canvasflow.io'; 6 private $base_url = "https://api.canvasflow.io/v1"; 7 7 8 private $version; 8 /*private $base_url = 'http://api.canvasflow.webhop.net/v1/index.cfm';9 public $domain = 'canvasflow.webhop.net';*/10 9 private $max_timeout = 30; 11 10 private $canvasflow_shortcodes; … … 37 36 38 37 public function publish_post($content, $post_title, $post_id, $style_id, $issue_id, $secret_key, $merge_adjacent_paragraphs, $publication_id, $channel_id, $collection_id, $title_in_content = FALSE, $author_name, $post_date, $auto_publish = FALSE, $enable_feature_image = TRUE) { 38 // $url = $this->base_url."/article"; 39 // $url = "http://api.{$this->domain}/v1/index.cfm?endpoint=/article"; 39 40 $url = $this->base_url."/article"; 40 41 … … 71 72 if($this->canvasflow_shortcodes != null) { 72 73 $this->canvasflow_shortcodes->register(); 73 } else {74 echo '<script>console.log("Shortcodes are null")</script>';75 74 } 76 75 … … 83 82 if($this->canvasflow_shortcodes != null) { 84 83 $this->canvasflow_shortcodes->unregister(); 85 } else {86 echo '<script>console.log("Shortcodes are null")</script>';87 84 } 88 85 … … 93 90 if($title_in_content == 1) { 94 91 $content = "<h1>{$post_title}</h1>".$content; 95 } 92 } 96 93 97 94 // Uncomment this to ignore shortcodes … … 106 103 107 104 $data = array( 108 'secret key' => $secret_key,105 'secretKey' => $secret_key, 109 106 'content' => $content, 110 107 'contentType' => "html", … … 135 132 'httpversion' => '1.0', 136 133 'blocking' => true, 137 'headers' => array(), 134 'headers' => array( 135 'Accept-Encoding' => 'gzip, deflate' 136 ), 138 137 'body' => $data, 139 138 'cookies' => array() … … 214 213 'timeout' => 45, 215 214 'redirection' => 5, 216 'httpversion' => '1.0' 215 'httpversion' => '1.0', 216 'headers' => array( 217 'Accept-Encoding' => 'gzip, deflate' 218 ) 217 219 )); 218 220 … … 238 240 'timeout' => 45, 239 241 'redirection' => 5, 240 'httpversion' => '1.0' 242 'httpversion' => '1.0', 243 'headers' => array( 244 'Accept-Encoding' => 'gzip, deflate' 245 ) 241 246 )); 242 247 if ( is_wp_error( $response ) ) { … … 267 272 'timeout' => 45, 268 273 'redirection' => 5, 269 'httpversion' => '1.0' 274 'httpversion' => '1.0', 275 'headers' => array( 276 'Accept-Encoding' => 'gzip, deflate' 277 ) 270 278 )); 271 279 … … 291 299 'timeout' => 45, 292 300 'redirection' => 5, 293 'httpversion' => '1.0' 301 'httpversion' => '1.0', 302 'headers' => array( 303 'Accept-Encoding' => 'gzip, deflate' 304 ) 294 305 )); 295 306 … … 316 327 'timeout' => 45, 317 328 'redirection' => 5, 318 'httpversion' => '1.0' 329 'httpversion' => '1.0', 330 'headers' => array( 331 'Accept-Encoding' => 'gzip, deflate' 332 ) 319 333 )); 320 334 if ( is_wp_error( $response ) ) { … … 346 360 'timeout' => 45, 347 361 'redirection' => 5, 348 'httpversion' => '1.0' 362 'httpversion' => '1.0', 363 'headers' => array( 364 'Accept-Encoding' => 'gzip, deflate' 365 ) 349 366 )); 350 367 … … 373 390 'timeout' => 45, 374 391 'redirection' => 5, 375 'httpversion' => '1.0' 392 'httpversion' => '1.0', 393 'headers' => array( 394 'Accept-Encoding' => 'gzip, deflate' 395 ) 376 396 )); 377 397 … … 392 412 'timeout' => 45, 393 413 'redirection' => 5, 394 'httpversion' => '1.0' 414 'httpversion' => '1.0', 415 'headers' => array( 416 'Accept-Encoding' => 'gzip, deflate' 417 ) 395 418 )); 396 419 -
canvasflow/trunk/readme.txt
r2057808 r2126721 3 3 Tags: Canvasflow, Digital Publishing Solution, Digital Publishing, Publishing, HTML5, Twixl, Pugpig, Sprylab, PurpleDS, Adobe, AEM Mobile, Adobe Experience Manager Mobile 4 4 Requires at least: 4.2 5 Tested up to: 5. 1.15 Tested up to: 5.2.2 6 6 Stable tag: stable 7 7 License: GPLv3 or later … … 74 74 75 75 == Changelog == 76 = 1.5.3 = 77 * Added support for new API syntax 78 76 79 = 1.5.2 = 77 80 * Works with wordpress 5.1.1 … … 182 185 183 186 == Upgrade Notice == 187 = 1.5.3 = 188 * Added support for new API syntax 189 184 190 = 1.5.2 = 185 191 * Works with wordpress 5.1.1
Note: See TracChangeset
for help on using the changeset viewer.