Changeset 1736371
- Timestamp:
- 09/26/2017 03:03:36 PM (9 years ago)
- Location:
- canvasflow/trunk
- Files:
-
- 6 edited
-
README.md (modified) (2 diffs)
-
canvasflow-plugin.php (modified) (1 diff)
-
includes/canvasflow-main.php (modified) (3 diffs)
-
includes/canvasflow-post-manager.php (modified) (2 diffs)
-
includes/canvasflow-settings.php (modified) (9 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
canvasflow/trunk/README.md
r1715448 r1736371 55 55 56 56 #### Changelog 57 ##### 0.9.6 58 * Replace [] with array() 59 57 60 ##### 0.9.5 58 61 * Add error message when there are no styles in a publication 59 62 60 63 ##### 0.9.4 64 * Change plugin base_url from http://api.canvasflow.webhop.net/ to http://api.canvasflow.io/ 61 65 * Upload pages to Canvasflow 62 66 … … 75 79 76 80 #### Upgrade Notice 81 ##### 0.9.6 82 Add support for PHP 5.4 and below 83 77 84 ##### 0.9.5 78 85 Add a message when there are no styles in a publication -
canvasflow/trunk/canvasflow-plugin.php
r1715452 r1736371 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: 0.9. 55 Version: 0.9.6 6 6 Developer: Canvasflow 7 7 Developer URI: https://canvasflow.io -
canvasflow/trunk/includes/canvasflow-main.php
r1714764 r1736371 9 9 10 10 class Canvasflow_Main { 11 private $base_url = 'http://api.canvasflow. io/v1/index.cfm';11 private $base_url = 'http://api.canvasflow.webhop.net/v1/index.cfm'; 12 12 private $wpdb; 13 13 private $user_id; … … 65 65 echo "<div class=\"error-message-static\"><div>Missing <a href=\"admin.php?page=canvasflow-settings\" style=\"color: #000\">Publication.</a></div></div>"; 66 66 } else { 67 $styles = [];67 $styles = array(); 68 68 foreach($this->get_styles_from_remote($publication_id, $secret_key) as $style) { 69 69 array_push($styles, $style); … … 157 157 } 158 158 159 $posts = [];159 $posts = array(); 160 160 161 161 $result_posts = $this->wpdb->get_results($query); -
canvasflow/trunk/includes/canvasflow-post-manager.php
r1714764 r1736371 64 64 } 65 65 66 $posts = [];66 $posts = array(); 67 67 68 68 $result_posts = $this->wpdb->get_results($query); … … 232 232 } 233 233 234 $posts = [];234 $posts = array(); 235 235 236 236 foreach ( $this->wpdb->get_results($query) as $post ){ -
canvasflow/trunk/includes/canvasflow-settings.php
r1715448 r1736371 9 9 10 10 class Canvasflow_Settings { 11 private $base_url = 'http://api.canvasflow. io/v1/index.cfm';11 private $base_url = 'http://api.canvasflow.webhop.net/v1/index.cfm'; 12 12 private $wpdb; 13 13 private $user_id; … … 16 16 private $merge_adjacent_paragraphs = FALSE; 17 17 private $publication_id = ''; 18 private $publications = [];18 private $publications = array(); 19 19 private $style_id = 0; 20 private $styles = [];20 private $styles = array(); 21 21 private $valid_secret_key = TRUE; 22 22 … … 39 39 if($db_secret_key != '') { 40 40 $this->secret_key = $db_secret_key; 41 $this->publications = [];41 $this->publications = array(); 42 42 foreach($this->get_remote_publications($db_secret_key) as $publication) { 43 43 if($publication['type'] == 'article') { … … 49 49 $this->publication_id = $db_publication_id; 50 50 51 $this->styles = [];51 $this->styles = array(); 52 52 foreach($this->get_remote_styles($db_secret_key, $this->publication_id) as $style) { 53 53 array_push($this->styles, $style); … … 61 61 } else { 62 62 $this->style_id = ''; 63 $this->styles = [];63 $this->styles = array(); 64 64 } 65 65 } 66 66 } else { 67 67 $this->publication_id = ''; 68 $this->publications = [];68 $this->publications = array(); 69 69 $this->style_id = ''; 70 $this->styles = [];70 $this->styles = array(); 71 71 } 72 72 } … … 110 110 $this->merge_adjacent_paragraphs = 1; 111 111 $this->publication_id = ''; 112 $this->publications = [];112 $this->publications = array(); 113 113 $this->style_id = 0; 114 $this->styles = [];114 $this->styles = array(); 115 115 } 116 116 … … 118 118 $this->publication_id = $new_publication_id; 119 119 120 $this->publications = [];120 $this->publications = array(); 121 121 foreach($this->get_remote_publications($this->secret_key) as $publication) { 122 122 array_push($this->publications, $publication); 123 123 } 124 124 125 $this->styles = [];125 $this->styles = array(); 126 126 foreach($this->get_remote_styles($this->secret_key, $this->publication_id) as $style) { 127 127 array_push($this->styles, $style); … … 202 202 } 203 203 } 204 return [];204 return array(); 205 205 } 206 206 … … 216 216 $body = $response['body']; 217 217 if($http_response_code == 200){ 218 if($body == " []"){218 if($body == "array()"){ 219 219 $message = "There are no styles for this publication"; 220 220 echo "<div class=\"error-message\"><div><b>{$message}</b></div></div>"; -
canvasflow/trunk/readme.txt
r1715448 r1736371 70 70 71 71 == Changelog == 72 = 0.9.6 = 73 * Replace [] with array() 74 72 75 = 0.9.5 = 73 76 * Add a message when a publication don't have any styles … … 90 93 91 94 == Upgrade Notice == 95 = 0.9.6 = 96 Add support for PHP 5.4 and below 97 92 98 = 0.9.4 = 93 99 This version let the user post pages as article in Canvasflow.
Note: See TracChangeset
for help on using the changeset viewer.