JSON API - Version 0.9.6

Version Description

Bugfix release for something added in 0.9.5.

Download this release

Release Info

Developer dphiffer
Plugin Icon wp plugin JSON API
Version 0.9.6
Comparing to
See all releases

Code changes from version 0.9.5 to 0.9.6

Files changed (3) hide show
  1. json-api.php +1 -1
  2. models/post.php +3 -1
  3. readme.txt +7 -1
json-api.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: JSON API
4
  Plugin URI: http://wordpress.org/extend/plugins/json-api/
5
  Description: A RESTful API for WordPress
6
- Version: 0.9.5
7
  Author: Dan Phiffer
8
  Author URI: http://phiffer.org/
9
  */
3
  Plugin Name: JSON API
4
  Plugin URI: http://wordpress.org/extend/plugins/json-api/
5
  Description: A RESTful API for WordPress
6
+ Version: 0.9.6
7
  Author: Dan Phiffer
8
  Author URI: http://phiffer.org/
9
  */
models/post.php CHANGED
@@ -214,12 +214,14 @@ class JSON_API_Post {
214
  }
215
 
216
  function set_thumbnail_value() {
 
217
  $values = get_post_custom_values('_thumbnail_id', $this->id);
218
  if (empty($values)) {
219
  unset($this->thumbnail);
220
  return;
221
  }
222
- foreach ($this->attachments as $attachment) {
 
223
  if ($attachment->id == $values[0]) {
224
  $image = $attachment->images['thumbnail'];
225
  $this->thumbnail = $image->url;
214
  }
215
 
216
  function set_thumbnail_value() {
217
+ global $json_api;
218
  $values = get_post_custom_values('_thumbnail_id', $this->id);
219
  if (empty($values)) {
220
  unset($this->thumbnail);
221
  return;
222
  }
223
+ $attachments = $json_api->introspector->get_attachments($this->id);
224
+ foreach ($attachments as $attachment) {
225
  if ($attachment->id == $values[0]) {
226
  $image = $attachment->images['thumbnail'];
227
  $this->thumbnail = $image->url;
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: dphiffer
3
  Tags: json, api, ajax, cms, admin, integration, moma
4
  Requires at least: 2.8
5
  Tested up to: 2.9
6
- Stable tag: 0.9.5
7
 
8
  A RESTful API for WordPress
9
 
@@ -588,6 +588,9 @@ Submits a comment to a WordPress post.
588
 
589
  == Changelog ==
590
 
 
 
 
591
  = 0.9.5 (2010-05-27): =
592
  * Added a `thumbnail` property to Post response objects
593
 
@@ -638,6 +641,9 @@ Submits a comment to a WordPress post.
638
 
639
  == Upgrade Notice ==
640
 
 
 
 
641
  = 0.9.5 =
642
  Feature addition: post thumbnails now included in response objects.
643
 
3
  Tags: json, api, ajax, cms, admin, integration, moma
4
  Requires at least: 2.8
5
  Tested up to: 2.9
6
+ Stable tag: 0.9.6
7
 
8
  A RESTful API for WordPress
9
 
588
 
589
  == Changelog ==
590
 
591
+ = 0.9.6 (2010-05-27): =
592
+ * Fixed a bug introduced in 0.9.5
593
+
594
  = 0.9.5 (2010-05-27): =
595
  * Added a `thumbnail` property to Post response objects
596
 
641
 
642
  == Upgrade Notice ==
643
 
644
+ = 0.9.6 =
645
+ Bugfix release for something added in 0.9.5.
646
+
647
  = 0.9.5 =
648
  Feature addition: post thumbnails now included in response objects.
649