JSON API - Version 1.0.8

Version Description

Long overdue bugfix/improvement release

Download this release

Release Info

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

Code changes from version 1.0.7 to 1.0.8

controllers/core.php CHANGED
@@ -42,6 +42,22 @@ class JSON_API_Core_Controller {
42
  return $this->posts_result($posts);
43
  }
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  public function get_post() {
46
  global $json_api, $post;
47
  extract($json_api->query->get(array('id', 'slug', 'post_id', 'post_slug')));
@@ -239,10 +255,12 @@ class JSON_API_Core_Controller {
239
  public function get_page_index() {
240
  global $json_api;
241
  $pages = array();
 
 
242
  // Thanks to blinder for the fix!
243
  $numberposts = empty($json_api->query->count) ? -1 : $json_api->query->count;
244
  $wp_posts = get_posts(array(
245
- 'post_type' => 'page',
246
  'post_parent' => 0,
247
  'order' => 'ASC',
248
  'orderby' => 'menu_order',
42
  return $this->posts_result($posts);
43
  }
44
 
45
+ public function get_posts() {
46
+ global $json_api;
47
+ $url = parse_url($_SERVER['REQUEST_URI']);
48
+ $defaults = array(
49
+ 'ignore_sticky_posts' => true
50
+ );
51
+ $query = wp_parse_args($url['query']);
52
+ unset($query['json']);
53
+ unset($query['post_status']);
54
+ $query = array_merge($defaults, $query);
55
+ $posts = $json_api->introspector->get_posts($query);
56
+ $result = $this->posts_result($posts);
57
+ $result['query'] = $query;
58
+ return $result;
59
+ }
60
+
61
  public function get_post() {
62
  global $json_api, $post;
63
  extract($json_api->query->get(array('id', 'slug', 'post_id', 'post_slug')));
255
  public function get_page_index() {
256
  global $json_api;
257
  $pages = array();
258
+ $post_type = $json_api->query->post_type ? $json_api->query->post_type : 'page';
259
+
260
  // Thanks to blinder for the fix!
261
  $numberposts = empty($json_api->query->count) ? -1 : $json_api->query->count;
262
  $wp_posts = get_posts(array(
263
+ 'post_type' => $post_type,
264
  'post_parent' => 0,
265
  'order' => 'ASC',
266
  'orderby' => 'menu_order',
controllers/widgets.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Controller name: Widgets
4
+ Controller description: Retrieve sidebar widgets
5
+ */
6
+
7
+ class JSON_API_Widgets_Controller {
8
+
9
+ function get_sidebar() {
10
+ global $json_api;
11
+ $index = @$_REQUEST['sidebar_id'];
12
+ if (empty($_REQUEST['sidebar_id'])) {
13
+ $json_api->error("No sidebar specified. Include 'sidebar_id' var in your request.");
14
+ } else if (!is_active_sidebar($index)) {
15
+ $json_api->error("Sidebar '$index' is not active.");
16
+ }
17
+
18
+ $widget_params = array(
19
+ 'before_widget',
20
+ 'after_widget',
21
+ 'before_title',
22
+ 'after_title'
23
+ );
24
+ $json_api_params = array();
25
+ foreach ($widget_params as $param) {
26
+ if (isset($_REQUEST[$param])) {
27
+ $json_api_params[$param] = $_REQUEST[$param];
28
+ }
29
+ }
30
+
31
+ $widgets = array();
32
+
33
+ global $wp_registered_sidebars, $wp_registered_widgets;
34
+
35
+ if ( is_int($index) ) {
36
+ $index = "sidebar-$index";
37
+ } else {
38
+ $index = sanitize_title($index);
39
+ foreach ( (array) $wp_registered_sidebars as $key => $value ) {
40
+ if ( sanitize_title($value['name']) == $index ) {
41
+ $index = $key;
42
+ break;
43
+ }
44
+ }
45
+ }
46
+
47
+ $sidebars_widgets = wp_get_sidebars_widgets();
48
+
49
+ if ( empty($wp_registered_sidebars[$index]) || !array_key_exists($index, $sidebars_widgets) || !is_array($sidebars_widgets[$index]) || empty($sidebars_widgets[$index]) )
50
+ return false;
51
+
52
+ $sidebar = $wp_registered_sidebars[$index];
53
+
54
+ $did_one = false;
55
+ foreach ( (array) $sidebars_widgets[$index] as $id ) {
56
+
57
+ if ( !isset($wp_registered_widgets[$id]) ) continue;
58
+
59
+ $params = array_merge(
60
+ array( array_merge( $sidebar, array('widget_id' => $id, 'widget_name' => $wp_registered_widgets[$id]['name']), $json_api_params ) ),
61
+ (array) $wp_registered_widgets[$id]['params']
62
+ );
63
+
64
+
65
+ // Substitute HTML id and class attributes into before_widget
66
+ $classname_ = '';
67
+ foreach ( (array) $wp_registered_widgets[$id]['classname'] as $cn ) {
68
+ if ( is_string($cn) )
69
+ $classname_ .= '_' . $cn;
70
+ elseif ( is_object($cn) )
71
+ $classname_ .= '_' . get_class($cn);
72
+ }
73
+ $classname_ = ltrim($classname_, '_');
74
+ $params[0]['before_widget'] = sprintf($params[0]['before_widget'], $id, $classname_);
75
+
76
+ $params = apply_filters( 'dynamic_sidebar_params', $params );
77
+
78
+ $callback = $wp_registered_widgets[$id]['callback'];
79
+
80
+ do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] );
81
+
82
+ if ( is_callable($callback) ) {
83
+ ob_start();
84
+ $object = $callback[0];
85
+ $settings = $object->get_settings();
86
+ $widget_params = $wp_registered_widgets[$id]['params'];
87
+ $number = $widget_params[0]['number'];
88
+ $instance = $settings[$number];
89
+ call_user_func_array($callback, $params);
90
+ $widgets[] = array(
91
+ 'id' => $id,
92
+ 'widget' => trim(ob_get_contents()),
93
+ 'params' => $params[0],
94
+ 'instance' => $instance
95
+ );
96
+ ob_end_clean();
97
+ }
98
+ }
99
+
100
+ return array(
101
+ 'sidebar_id' => $index,
102
+ 'widgets' => $widgets
103
+ );
104
+ }
105
+
106
+ }
107
+
108
+ ?>
json-api.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
3
  Plugin Name: JSON API
4
- Plugin URI: http://wordpress.org/extend/plugins/json-api/
5
  Description: A RESTful API for WordPress
6
- Version: 1.0.7
7
  Author: Dan Phiffer
8
  Author URI: http://phiffer.org/
9
  */
1
  <?php
2
  /*
3
  Plugin Name: JSON API
4
+ Plugin URI: http://wordpress.org/plugins/json-api/
5
  Description: A RESTful API for WordPress
6
+ Version: 1.0.8
7
  Author: Dan Phiffer
8
  Author URI: http://phiffer.org/
9
  */
models/attachment.php CHANGED
@@ -41,13 +41,21 @@ class JSON_API_Attachment {
41
  $sizes = array_merge(array('full'), get_intermediate_image_sizes());
42
  }
43
  $this->images = array();
 
44
  foreach ($sizes as $size) {
45
  list($url, $width, $height) = wp_get_attachment_image_src($this->id, $size);
46
- $this->images[$size] = (object) array(
47
- 'url' => $url,
48
- 'width' => $width,
49
- 'height' => $height
50
- );
 
 
 
 
 
 
 
51
  }
52
  }
53
 
41
  $sizes = array_merge(array('full'), get_intermediate_image_sizes());
42
  }
43
  $this->images = array();
44
+ $home = get_bloginfo('home');
45
  foreach ($sizes as $size) {
46
  list($url, $width, $height) = wp_get_attachment_image_src($this->id, $size);
47
+ $filename = ABSPATH . substr($url, strlen($home) + 1);
48
+ if (file_exists($filename)) {
49
+ list($measured_width, $measured_height) = getimagesize($filename);
50
+ if ($measured_width == $width &&
51
+ $measured_height == $height) {
52
+ $this->images[$size] = (object) array(
53
+ 'url' => $url,
54
+ 'width' => $width,
55
+ 'height' => $height
56
+ );
57
+ }
58
+ }
59
  }
60
  }
61
 
models/post.php CHANGED
@@ -30,6 +30,7 @@ class JSON_API_Post {
30
  if (!empty($wp_post)) {
31
  $this->import_wp_object($wp_post);
32
  }
 
33
  }
34
 
35
  function create($values = null) {
@@ -136,7 +137,7 @@ class JSON_API_Post {
136
  $this->set_value('title', get_the_title($this->id));
137
  $this->set_value('title_plain', strip_tags(@$this->title));
138
  $this->set_content_value();
139
- $this->set_value('excerpt', get_the_excerpt());
140
  $this->set_value('date', get_the_time($date_format));
141
  $this->set_value('modified', date($date_format, strtotime($wp_post->post_modified)));
142
  $this->set_categories_value();
@@ -148,6 +149,8 @@ class JSON_API_Post {
148
  $this->set_value('comment_status', $wp_post->comment_status);
149
  $this->set_thumbnail_value();
150
  $this->set_custom_fields_value();
 
 
151
  }
152
 
153
  function set_value($key, $value) {
@@ -244,19 +247,27 @@ class JSON_API_Post {
244
  return;
245
  }
246
  $thumbnail_size = $this->get_thumbnail_size();
247
- list($thumbnail) = wp_get_attachment_image_src($attachment_id, $thumbnail_size);
248
- $this->thumbnail = $thumbnail;
 
 
 
249
  }
250
 
251
  function set_custom_fields_value() {
252
  global $json_api;
253
- if ($json_api->include_value('custom_fields') &&
254
- $json_api->query->custom_fields) {
255
- $keys = explode(',', $json_api->query->custom_fields);
256
  $wp_custom_fields = get_post_custom($this->id);
257
  $this->custom_fields = new stdClass();
258
- foreach ($keys as $key) {
259
- if (isset($wp_custom_fields[$key])) {
 
 
 
 
 
 
 
260
  $this->custom_fields->$key = $wp_custom_fields[$key];
261
  }
262
  }
@@ -265,6 +276,25 @@ class JSON_API_Post {
265
  }
266
  }
267
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  function get_thumbnail_size() {
269
  global $json_api;
270
  if ($json_api->query->thumbnail_size) {
30
  if (!empty($wp_post)) {
31
  $this->import_wp_object($wp_post);
32
  }
33
+ do_action("json_api_{$this->type}_constructor", $this);
34
  }
35
 
36
  function create($values = null) {
137
  $this->set_value('title', get_the_title($this->id));
138
  $this->set_value('title_plain', strip_tags(@$this->title));
139
  $this->set_content_value();
140
+ $this->set_value('excerpt', apply_filters('the_excerpt', get_the_excerpt()));
141
  $this->set_value('date', get_the_time($date_format));
142
  $this->set_value('modified', date($date_format, strtotime($wp_post->post_modified)));
143
  $this->set_categories_value();
149
  $this->set_value('comment_status', $wp_post->comment_status);
150
  $this->set_thumbnail_value();
151
  $this->set_custom_fields_value();
152
+ $this->set_custom_taxonomies($wp_post->post_type);
153
+ do_action("json_api_import_wp_post", $this, $wp_post);
154
  }
155
 
156
  function set_value($key, $value) {
247
  return;
248
  }
249
  $thumbnail_size = $this->get_thumbnail_size();
250
+ $this->thumbnail_size = $thumbnail_size;
251
+ $attachment = $json_api->introspector->get_attachment($attachment_id);
252
+ $image = $attachment->images[$thumbnail_size];
253
+ $this->thumbnail = $image->url;
254
+ $this->thumbnail_images = $attachment->images;
255
  }
256
 
257
  function set_custom_fields_value() {
258
  global $json_api;
259
+ if ($json_api->include_value('custom_fields')) {
 
 
260
  $wp_custom_fields = get_post_custom($this->id);
261
  $this->custom_fields = new stdClass();
262
+ if ($json_api->query->custom_fields) {
263
+ $keys = explode(',', $json_api->query->custom_fields);
264
+ }
265
+ foreach ($wp_custom_fields as $key => $value) {
266
+ if ($json_api->query->custom_fields) {
267
+ if (in_array($key, $keys)) {
268
+ $this->custom_fields->$key = $wp_custom_fields[$key];
269
+ }
270
+ } else if (substr($key, 0, 1) != '_') {
271
  $this->custom_fields->$key = $wp_custom_fields[$key];
272
  }
273
  }
276
  }
277
  }
278
 
279
+ function set_custom_taxonomies($type) {
280
+ global $json_api;
281
+ $taxonomies = get_taxonomies(array(
282
+ 'object_type' => array($type),
283
+ 'public' => true,
284
+ '_builtin' => false
285
+ ));
286
+ foreach ($taxonomies as $taxonomy) {
287
+ if ($json_api->include_value($taxonomy)) {
288
+ $terms = get_the_terms($this->id, $taxonomy);
289
+ if (!empty($terms)) {
290
+ $this->$taxonomy = array_values($terms);
291
+ } else {
292
+ $this->$taxonomy = array();
293
+ }
294
+ }
295
+ }
296
+ }
297
+
298
  function get_thumbnail_size() {
299
  global $json_api;
300
  if ($json_api->query->thumbnail_size) {
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dphiffer
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DH4MEG99JR2WE
4
  Tags: json, api, ajax, cms, admin, integration, moma
5
  Requires at least: 2.8
6
- Tested up to: 3.1
7
- Stable tag: 1.0.7
8
 
9
  A RESTful API for WordPress
10
 
@@ -31,32 +31,33 @@ See the [Other Notes](http://wordpress.org/extend/plugins/json-api/other_notes/)
31
 
32
  == Documentation ==
33
 
34
- 1. General concepts
35
- 1.1. Requests
36
- 1.2. Controllers
37
- 1.3. Responses
38
- 2. Request methods
39
- 2.1. Core controller methods
40
- 2.2. Posts controller methods
41
- 2.3. Respond controller methods
42
- 3. Request arguments
43
- 3.1. Output-modifying arguments
44
- 3.2. Content-modifying arguments
45
- 3.3. Using include/exclude and redirects
46
- 4. Response objects
47
- 4.1. Post response object
48
- 4.2. Category response object
49
- 4.3. Tag response object
50
- 4.4. Author response object
51
- 4.4. Comment response object
52
- 4.5. Attachment response object
53
- 5. Extending JSON API
54
- 5.1. Plugin hooks
55
- 5.2. Developing JSON API controllers
56
- 5.3. Configuration options
57
- 6. Unit tests
58
- 6.1. Preparing a WordPress test site
59
- 6.2. Running the tests
 
60
 
61
  == 1. General Concepts ==
62
 
@@ -175,6 +176,7 @@ Request methods are available from the following controllers:
175
  * Core controller - basic introspection methods
176
  * Posts controller - data manipulation methods for posts
177
  * Respond controller - comment/trackback submission methods
 
178
 
179
  == 2.1. Core controller methods ==
180
 
@@ -189,7 +191,7 @@ Returns information about JSON API.
189
 
190
  * `controller` - returns detailed information about a specific controller
191
 
192
- = Response =
193
 
194
  {
195
  "status": "ok",
@@ -199,8 +201,8 @@ Returns information about JSON API.
199
  ]
200
  }
201
 
202
-
203
- = Response =
204
 
205
  {
206
  "status": "ok",
@@ -222,7 +224,7 @@ Returns an array of recent posts. You can invoke this from the WordPress home pa
222
  * `page` - return a specific page number from the results
223
  * `post_type` - used to retrieve custom post types
224
 
225
- = Response =
226
 
227
  {
228
  "status": "ok",
@@ -235,7 +237,31 @@ Returns an array of recent posts. You can invoke this from the WordPress home pa
235
  ...
236
  ]
237
  }
 
 
 
238
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
 
240
  == Method: get_post ==
241
 
@@ -593,6 +619,16 @@ Submits a comment to a WordPress post.
593
 
594
  * `pending` - assigned if the comment submission is pending moderation
595
 
 
 
 
 
 
 
 
 
 
 
596
 
597
  == 3. Request arguments ==
598
 
@@ -934,7 +970,7 @@ There are a few necessary steps that need to be carried out before the test suit
934
  2. Configure and install a new copy of WordPress
935
  3. Delete the Hello World post and Sample Page (titled "About" in some versions of WordPress)
936
  4. Enable user-friendly URLs from Settings > Permalinks, use the "Day and name" format
937
- 5. Install the JSON API plugin and enable all bundled controllers from Settings > JSON API
938
  6. Import the [Theme Unit Test](http://codex.wordpress.org/Theme_Unit_Test) test data XML file from Settings > Import > WordPress (you will need to install the WordPress Importer plugin)
939
 
940
  == 6.2. Running the tests ==
@@ -955,6 +991,16 @@ You should see the test results print out culminating in a summary:
955
 
956
  == Changelog ==
957
 
 
 
 
 
 
 
 
 
 
 
958
  = 1.0.7 (2011-01-27): =
959
  * Created some basic unit tests
960
  * Fixed a bug where `get_author_posts` was unable to find users by `slug`
@@ -1062,6 +1108,9 @@ You should see the test results print out culminating in a summary:
1062
 
1063
  == Upgrade Notice ==
1064
 
 
 
 
1065
  = 1.0.7 =
1066
  Minor bugfix/improvement release
1067
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DH4MEG99JR2WE
4
  Tags: json, api, ajax, cms, admin, integration, moma
5
  Requires at least: 2.8
6
+ Tested up to: 3.5.1
7
+ Stable tag: 1.0.8
8
 
9
  A RESTful API for WordPress
10
 
31
 
32
  == Documentation ==
33
 
34
+ 1. [General concepts](#1.-General-Concepts)
35
+ 1.1. [Requests](#1.1.-Requests)
36
+ 1.2. [Controllers](#1.2.-Controllers)
37
+ 1.3. [Responses](#1.3.-Responses)
38
+ 2. [Request methods](#2.-Request-methods)
39
+ 2.1. [Core controller methods](#2.1.-Core-controller-methods)
40
+ 2.2. [Posts controller methods](#2.2.-Pages-controller-methods)
41
+ 2.3. [Respond controller methods](#2.3.-Respond-controller-methods)
42
+ 2.4. [Widgets controller methods](#2.4.-Widgets-controller-methods)
43
+ 3. [Request arguments](#3.-Request-arguments)
44
+ 3.1. [Output-modifying arguments](#3.1.-Output-modifying-arguments)
45
+ 3.2. [Content-modifying arguments](#3.2.-Content-modifying-arguments)
46
+ 3.3. [Using include/exclude and redirects](#3.3.-Using-include/exclude-and-redirects)
47
+ 4. [Response objects](#4.-Response-objects)
48
+ 4.1. [Post response object](#4.1.-Post-response-object)
49
+ 4.2. [Category response object](#4.2.-Category-response-object)
50
+ 4.3. [Tag response object](#4.3.-Tag-response-object)
51
+ 4.4. [Author response object](#4.4.-Author-response-object)
52
+ 4.5. [Comment response object](#4.5.-Comment-response-object)
53
+ 4.6. [Attachment response object](#4.6.-Attachment-response-object)
54
+ 5. [Extending JSON API](#5.-Extending-JSON-API)
55
+ 5.1. [Plugin hooks](#5.1.-Plugin-hooks)
56
+ 5.2. [Developing JSON API controllers](#5.2.-Developing-JSON-API-controllers)
57
+ 5.3. [Configuration options](#5.3.-Configuration-options)
58
+ 6. [Unit tests](#6.-Unit-tests)
59
+ 6.1. [Preparing a WordPress test site](#6.1.-Preparing-a-WordPress-test-site)
60
+ 6.2. [Running the tests](#6.2.-Running-the-tests)
61
 
62
  == 1. General Concepts ==
63
 
176
  * Core controller - basic introspection methods
177
  * Posts controller - data manipulation methods for posts
178
  * Respond controller - comment/trackback submission methods
179
+ * Widgets controller - retrieve sidebar widgets
180
 
181
  == 2.1. Core controller methods ==
182
 
191
 
192
  * `controller` - returns detailed information about a specific controller
193
 
194
+ = Response to `?json=core.info` =
195
 
196
  {
197
  "status": "ok",
201
  ]
202
  }
203
 
204
+
205
+ = Response to `?json=core.info&controller=core` =
206
 
207
  {
208
  "status": "ok",
224
  * `page` - return a specific page number from the results
225
  * `post_type` - used to retrieve custom post types
226
 
227
+ = Response to `?json=core.get_recent_posts` =
228
 
229
  {
230
  "status": "ok",
237
  ...
238
  ]
239
  }
240
+
241
+
242
+ == Method: get_posts ==
243
 
244
+ Returns posts according to WordPress's [`WP_Query` parameters](http://codex.wordpress.org/Class_Reference/WP_Query#Parameters). The one default parameter is `ignore_sticky_posts=1` (this can be overridden).
245
+
246
+ = Optional arguments =
247
+
248
+ * `count` - determines how many posts per page are returned (default value is 10)
249
+ * `page` - return a specific page number from the results
250
+ * `post_type` - used to retrieve custom post types
251
+
252
+ __Further reading__
253
+ See the [`WP_Query` documentation](http://codex.wordpress.org/Class_Reference/WP_Query#Parameters) for a full list of supported parameters. The `post_status` parameter is currently ignored.
254
+
255
+ = Response to `?json=get_posts&meta_key=enclosure` =
256
+
257
+ {
258
+ "status": "ok",
259
+ "count": 1,
260
+ "posts": [
261
+ { ... }
262
+ ]
263
+ }
264
+
265
 
266
  == Method: get_post ==
267
 
619
 
620
  * `pending` - assigned if the comment submission is pending moderation
621
 
622
+ == 2.4. Widgets controller methods ==
623
+
624
+ == Method: get_sidebar ==
625
+
626
+ Retrieves widgets assigned to a sidebar.
627
+
628
+ = Required arguments =
629
+
630
+ * `sidebar_id` - the name or number of the sidebar to retrieve
631
+
632
 
633
  == 3. Request arguments ==
634
 
970
  2. Configure and install a new copy of WordPress
971
  3. Delete the Hello World post and Sample Page (titled "About" in some versions of WordPress)
972
  4. Enable user-friendly URLs from Settings > Permalinks, use the "Day and name" format
973
+ 5. Install + Activate the JSON API plugin and enable all bundled controllers from Settings > JSON API
974
  6. Import the [Theme Unit Test](http://codex.wordpress.org/Theme_Unit_Test) test data XML file from Settings > Import > WordPress (you will need to install the WordPress Importer plugin)
975
 
976
  == 6.2. Running the tests ==
991
 
992
  == Changelog ==
993
 
994
+ = 1.0.8 (2013-06-12): =
995
+ * Added `widgets` controller
996
+ * Added a generic `get_posts` method to the core controller
997
+ * Added a `thumbnail_images` object property to complement `thumbnail` URL
998
+ * Attachment image files are now checked to exist and match the expected width/height
999
+ * Fixed a bug where `the_excerpt` filter wasn't being applied to the `excerpt` property
1000
+ * Fixed a bug where the number of child pages was being limited to 5
1001
+ * Fixed a bug where custom controller class names couldn't include numerics
1002
+ * Theme directory check for custom controllers
1003
+
1004
  = 1.0.7 (2011-01-27): =
1005
  * Created some basic unit tests
1006
  * Fixed a bug where `get_author_posts` was unable to find users by `slug`
1108
 
1109
  == Upgrade Notice ==
1110
 
1111
+ = 1.0.8 =
1112
+ Long overdue bugfix/improvement release
1113
+
1114
  = 1.0.7 =
1115
  Minor bugfix/improvement release
1116
 
singletons/api.php CHANGED
@@ -43,6 +43,7 @@ class JSON_API {
43
  $this->response->setup();
44
 
45
  // Run action hooks for method
 
46
  do_action("json_api-{$controller}-$method");
47
 
48
  // Error out if nothing is found
@@ -275,14 +276,22 @@ class JSON_API {
275
  function get_controllers() {
276
  $controllers = array();
277
  $dir = json_api_dir();
278
- $dh = opendir("$dir/controllers");
 
 
 
 
 
 
 
279
  while ($file = readdir($dh)) {
280
- if (preg_match('/(.+)\.php$/', $file, $matches)) {
281
- $controllers[] = $matches[1];
 
 
 
282
  }
283
  }
284
- $controllers = apply_filters('json_api_controllers', $controllers);
285
- return array_map('strtolower', $controllers);
286
  }
287
 
288
  function controller_is_active($controller) {
@@ -340,9 +349,19 @@ class JSON_API {
340
  }
341
 
342
  function controller_path($controller) {
343
- $dir = json_api_dir();
 
 
 
 
 
 
 
 
 
 
344
  $controller_class = $this->controller_class($controller);
345
- return apply_filters("{$controller_class}_path", "$dir/controllers/$controller.php");
346
  }
347
 
348
  function get_nonce_id($controller, $method) {
43
  $this->response->setup();
44
 
45
  // Run action hooks for method
46
+ do_action("json_api", $controller, $method);
47
  do_action("json_api-{$controller}-$method");
48
 
49
  // Error out if nothing is found
276
  function get_controllers() {
277
  $controllers = array();
278
  $dir = json_api_dir();
279
+ $this->check_directory_for_controllers("$dir/controllers", $controllers);
280
+ $this->check_directory_for_controllers(get_stylesheet_directory(), $controllers);
281
+ $controllers = apply_filters('json_api_controllers', $controllers);
282
+ return array_map('strtolower', $controllers);
283
+ }
284
+
285
+ function check_directory_for_controllers($dir, &$controllers) {
286
+ $dh = opendir($dir);
287
  while ($file = readdir($dh)) {
288
+ if (preg_match('/(.+)\.php$/i', $file, $matches)) {
289
+ $src = file_get_contents("$dir/$file");
290
+ if (preg_match("/class\s+JSON_API_{$matches[1]}_Controller/i", $src)) {
291
+ $controllers[] = $matches[1];
292
+ }
293
  }
294
  }
 
 
295
  }
296
 
297
  function controller_is_active($controller) {
349
  }
350
 
351
  function controller_path($controller) {
352
+ $json_api_dir = json_api_dir();
353
+ $json_api_path = "$json_api_dir/controllers/$controller.php";
354
+ $theme_dir = get_stylesheet_directory();
355
+ $theme_path = "$theme_dir/$controller.php";
356
+ if (file_exists($theme_path)) {
357
+ $path = $theme_path;
358
+ } else if (file_exists($json_api_path)) {
359
+ $path = $json_api_path;
360
+ } else {
361
+ $path = null;
362
+ }
363
  $controller_class = $this->controller_class($controller);
364
+ return apply_filters("{$controller_class}_path", $path);
365
  }
366
 
367
  function get_nonce_id($controller, $method) {
singletons/introspector.php CHANGED
@@ -3,16 +3,17 @@
3
  class JSON_API_Introspector {
4
 
5
  public function get_posts($query = false, $wp_posts = false) {
6
- global $post;
7
  $this->set_posts_query($query);
8
  $output = array();
9
  while (have_posts()) {
10
  the_post();
11
  if ($wp_posts) {
12
- $output[] = $post;
13
  } else {
14
- $output[] = new JSON_API_Post($post);
15
  }
 
16
  }
17
  return $output;
18
  }
@@ -215,7 +216,8 @@ class JSON_API_Introspector {
215
  'post_type' => 'attachment',
216
  'post_parent' => $post_id,
217
  'orderby' => 'menu_order',
218
- 'order' => 'ASC'
 
219
  ));
220
  $attachments = array();
221
  if (!empty($wp_attachments)) {
@@ -226,16 +228,32 @@ class JSON_API_Introspector {
226
  return $attachments;
227
  }
228
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  public function attach_child_posts(&$post) {
230
  $post->children = array();
231
  $wp_children = get_posts(array(
232
  'post_type' => $post->type,
233
  'post_parent' => $post->id,
234
  'order' => 'ASC',
235
- 'orderby' => 'menu_order'
 
 
236
  ));
237
  foreach ($wp_children as $wp_post) {
238
- $post->children[] = new JSON_API_Post($wp_post);
 
 
239
  }
240
  foreach ($post->children as $child) {
241
  $this->attach_child_posts($child);
@@ -291,6 +309,7 @@ class JSON_API_Introspector {
291
 
292
  if (!empty($query)) {
293
  query_posts($query);
 
294
  }
295
  }
296
 
3
  class JSON_API_Introspector {
4
 
5
  public function get_posts($query = false, $wp_posts = false) {
6
+ global $post, $wp_query;
7
  $this->set_posts_query($query);
8
  $output = array();
9
  while (have_posts()) {
10
  the_post();
11
  if ($wp_posts) {
12
+ $new_post = $post;
13
  } else {
14
+ $new_post = new JSON_API_Post($post);
15
  }
16
+ $output[] = $new_post;
17
  }
18
  return $output;
19
  }
216
  'post_type' => 'attachment',
217
  'post_parent' => $post_id,
218
  'orderby' => 'menu_order',
219
+ 'order' => 'ASC',
220
+ 'suppress_filters' => false
221
  ));
222
  $attachments = array();
223
  if (!empty($wp_attachments)) {
228
  return $attachments;
229
  }
230
 
231
+ public function get_attachment($attachment_id) {
232
+ global $wpdb;
233
+ $wp_attachment = $wpdb->get_row(
234
+ $wpdb->prepare("
235
+ SELECT *
236
+ FROM $wpdb->posts
237
+ WHERE ID = %d
238
+ ", $attachment_id)
239
+ );
240
+ return new JSON_API_Attachment($wp_attachment);
241
+ }
242
+
243
  public function attach_child_posts(&$post) {
244
  $post->children = array();
245
  $wp_children = get_posts(array(
246
  'post_type' => $post->type,
247
  'post_parent' => $post->id,
248
  'order' => 'ASC',
249
+ 'orderby' => 'menu_order',
250
+ 'numberposts' => -1,
251
+ 'suppress_filters' => false
252
  ));
253
  foreach ($wp_children as $wp_post) {
254
+ $new_post = new JSON_API_Post($wp_post);
255
+ $new_post->parent = $post->id;
256
+ $post->children[] = $new_post;
257
  }
258
  foreach ($post->children as $child) {
259
  $this->attach_child_posts($child);
309
 
310
  if (!empty($query)) {
311
  query_posts($query);
312
+ do_action('json_api_query', $wp_query);
313
  }
314
  }
315
 
singletons/query.php CHANGED
@@ -106,7 +106,7 @@ class JSON_API_Query {
106
  }
107
  if (preg_match('/^[a-zA-Z_]+$/', $json)) {
108
  return $this->get_legacy_controller($json);
109
- } else if (preg_match('/^([a-zA-Z_]+)(\/|\.)[a-zA-Z_]+$/', $json, $matches)) {
110
  return $matches[1];
111
  } else {
112
  return 'core';
106
  }
107
  if (preg_match('/^[a-zA-Z_]+$/', $json)) {
108
  return $this->get_legacy_controller($json);
109
+ } else if (preg_match('/^([a-zA-Z0-9_]+)(\/|\.)[a-zA-Z0-9_]+$/', $json, $matches)) {
110
  return $matches[1];
111
  } else {
112
  return 'core';
tests/core.get_author_index-01.phpt CHANGED
@@ -7,8 +7,15 @@ require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_author_index');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","count":2,"authors":[{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},{"id":4,"slug":"ian-stewart","name":"Ian Stewart","first_name":"","last_name":"","nickname":"Ian Stewart","url":"","description":""}]}
 
 
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_author_index');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $author = $response->authors[0];
12
+
13
+ echo "Response status: $response->status\n";
14
+ echo "Author count: $response->count\n";
15
+ echo "Author name: $author->name\n";
16
 
17
  ?>
18
  --EXPECT--
19
+ Response status: ok
20
+ Author count: 1
21
+ Author name: themedemos
tests/core.get_author_posts-01.phpt CHANGED
@@ -5,10 +5,18 @@ core.get_author_posts by slug
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
- $http->get('http://wordpress.test/?json=core.get_author_posts&slug=chip-bennett');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","count":10,"pages":3,"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, &#8220;Oh, why can&#8217;t you remain like this for ever!&#8221; This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"right-align-no-caption\">Right-align, no caption<\/h3>\n<p>Right-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignright size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"no-alignment-no-caption\">No alignment, no caption<\/h3>\n<p>None-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignnone size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":555,"type":"post","slug":"post-format-test-gallery","url":"http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/","status":"publish","title":"Post Format Test: Gallery","title_plain":"Post Format Test: Gallery","content":"\n\t\t<div id='gallery-1' class='gallery galleryid-555 gallery-columns-3 gallery-size-thumbnail'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/canola2\/' title='canola2'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg\" class=\"attachment-thumbnail\" alt=\"canola\" title=\"canola2\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20040724_152504_532\/' title='dsc20040724_152504_532'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\" class=\"attachment-thumbnail\" alt=\"chunk of resinous blackboy husk\" title=\"dsc20040724_152504_532\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption'>\n\t\t\t\tChunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.\n\t\t\t\t<\/dd><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050315_145007_132\/' title='dsc20050315_145007_132'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050315_145007_132\" title=\"dsc20050315_145007_132\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050604_133440_3421\/' title='dsc20050604_133440_3421'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050604_133440_3421\" title=\"dsc20050604_133440_3421\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050727_091048_222\/' title='dsc20050727_091048_222'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050727_091048_222\" title=\"dsc20050727_091048_222\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050813_115856_52\/' title='dsc20050813_115856_52'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050813_115856_52\" title=\"dsc20050813_115856_52\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050831_165238_332\/' title='dsc20050831_165238_332'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050831_165238_332\" title=\"dsc20050831_165238_332\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050901_105100_212\/' title='dsc20050901_105100_212'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg\" class=\"attachment-thumbnail\" alt=\"Seed pods on stem, Woodvale\" title=\"dsc20050901_105100_212\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption'>\n\t\t\t\tSeed pods on stem, Woodvale\n\t\t\t\t<\/dd><\/dl>\n\t\t\t<br style='clear: both;' \/>\n\t\t<\/div>\n\n","excerpt":"","date":"2008-06-10 07:24:14","modified":"2008-06-10 07:24:14","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":611,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","slug":"canola2","title":"canola2","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":264,"height":198}}},{"id":612,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","slug":"dsc20040724_152504_532","title":"dsc20040724_152504_532","description":"","caption":"Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":264,"height":198}}},{"id":613,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","slug":"dsc20050315_145007_132","title":"dsc20050315_145007_132","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":264,"height":198}}},{"id":615,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","slug":"dsc20050604_133440_3421","title":"dsc20050604_133440_3421","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":264,"height":198}}},{"id":616,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","slug":"dsc20050727_091048_222","title":"dsc20050727_091048_222","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":264,"height":198}}},{"id":617,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","slug":"dsc20050813_115856_52","title":"dsc20050813_115856_52","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":264,"height":198}}},{"id":618,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","slug":"dsc20050831_165238_332","title":"dsc20050831_165238_332","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":264,"height":198}}},{"id":619,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","slug":"dsc20050901_105100_212","title":"dsc20050901_105100_212","description":"","caption":"Seed pods on stem, Woodvale","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":264,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":559,"type":"post","slug":"post-format-test-aside","url":"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/","status":"publish","title":"Post Format Test: Aside","title_plain":"Post Format Test: Aside","content":"<p>\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it&#8217;s always come first, but the music ain&#8217;t worth nothing if you can&#8217;t lay it on the public. The main thing is to live for that audience, &#8217;cause what you&#8217;re there for is to please the people.\u201d<\/p>\n","excerpt":"\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it&#8217;s always come first, but the music ain&#8217;t worth nothing if you can&#8217;t lay it on the public. The main &hellip; <a href=\"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-06-09 07:51:54","modified":"2008-06-09 07:51:54","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":562,"type":"post","slug":"post-format-test-chat","url":"http:\/\/wordpress.test\/2008\/06\/08\/post-format-test-chat\/","status":"publish","title":"Post Format Test: Chat","title_plain":"Post Format Test: Chat","content":"<p>John: foo<br \/>\nMary: bar<br \/>\nJohn: foo 2<\/p>\n","excerpt":"John: foo Mary: bar John: foo 2","date":"2008-06-08 07:59:31","modified":"2008-06-08 07:59:31","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":565,"type":"post","slug":"post-format-test-link","url":"http:\/\/wordpress.test\/2008\/06\/07\/post-format-test-link\/","status":"publish","title":"Post Format Test: Link","title_plain":"Post Format Test: Link","content":"<p><a href=\"http:\/\/make.wordpress.org\/themes\" title=\"The WordPress Theme Review Team Website\">The WordPress Theme Review Team Website<\/a><\/p>\n","excerpt":"The WordPress Theme Review Team Website","date":"2008-06-07 08:06:53","modified":"2008-06-07 08:06:53","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":674,"type":"post","slug":"post-format-test-image-attached","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-attached\/","status":"publish","title":"Post Format Test: Image (Attached)","title_plain":"Post Format Test: Image (Attached)","content":"<div id=\"attachment_675\" class=\"wp-caption aligncenter\" style=\"width: 445px\"><a href=\"http:\/\/wpthemetestdata.wordpress.com\/2008\/06\/06\/post-format-test-image-attached\/boat-2\/\" rel=\"attachment wp-att-675\"><img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg\" alt=\"boat\" title=\"boat\" width=\"435\" height=\"288\" class=\"size-full wp-image-675\" \/><\/a><p class=\"wp-caption-text\">A picture is worth a thousand words<\/p><\/div>\n","excerpt":"","date":"2008-06-06 09:42:19","modified":"2008-06-06 09:42:19","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":675,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","slug":"boat-2","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":674,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":568,"type":"post","slug":"post-format-test-image-linked","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-linked\/","status":"publish","title":"Post Format Test: Image (Linked)","title_plain":"Post Format Test: Image (Linked)","content":"<div id=\"attachment_612\" class=\"wp-caption aligncenter\" style=\"width: 650px\"><a href=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\"><img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\" alt=\"chunk of resinous blackboy husk\" title=\"dsc20040724_152504_532\" width=\"640\" height=\"480\" class=\"size-full wp-image-612\" \/><\/a><p class=\"wp-caption-text\">Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.<\/p><\/div>\n","excerpt":"","date":"2008-06-06 08:09:39","modified":"2008-06-06 08:09:39","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":575,"type":"post","slug":"post-format-test-quote","url":"http:\/\/wordpress.test\/2008\/06\/05\/post-format-test-quote\/","status":"publish","title":"Post Format Test: Quote","title_plain":"Post Format Test: Quote","content":"<blockquote><p>Only one thing is impossible for God: To find any sense in any copyright law on the planet.<br \/>\n<cite><a href=\"http:\/\/www.brainyquote.com\/quotes\/quotes\/m\/marktwain163473.html\">Mark Twain<\/a><\/cite><\/p><\/blockquote>\n","excerpt":"Only one thing is impossible for God: To find any sense in any copyright law on the planet. Mark Twain","date":"2008-06-05 08:13:15","modified":"2008-06-05 08:13:15","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]}
 
 
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
+ $http->get('http://wordpress.test/?json=core.get_author_posts&slug=themedemos');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $author = $response->author;
12
+ $post = $response->posts[0];
13
+
14
+ echo "Response status: $response->status\n";
15
+ echo "Post count: $response->count\n";
16
+ echo "First post title: $post->title\n";
17
 
18
  ?>
19
  --EXPECT--
20
+ Response status: ok
21
+ Post count: 10
22
+ First post title: Markup: HTML Tags and Formatting
tests/core.get_author_posts-02.phpt CHANGED
@@ -5,10 +5,18 @@ core.get_author_posts by author_slug
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
- $http->get('http://wordpress.test/?json=core.get_author_posts&author_slug=chip-bennett');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","count":10,"pages":3,"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, &#8220;Oh, why can&#8217;t you remain like this for ever!&#8221; This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"right-align-no-caption\">Right-align, no caption<\/h3>\n<p>Right-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignright size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"no-alignment-no-caption\">No alignment, no caption<\/h3>\n<p>None-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignnone size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":555,"type":"post","slug":"post-format-test-gallery","url":"http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/","status":"publish","title":"Post Format Test: Gallery","title_plain":"Post Format Test: Gallery","content":"\n\t\t<div id='gallery-1' class='gallery galleryid-555 gallery-columns-3 gallery-size-thumbnail'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/canola2\/' title='canola2'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg\" class=\"attachment-thumbnail\" alt=\"canola\" title=\"canola2\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20040724_152504_532\/' title='dsc20040724_152504_532'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\" class=\"attachment-thumbnail\" alt=\"chunk of resinous blackboy husk\" title=\"dsc20040724_152504_532\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption'>\n\t\t\t\tChunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.\n\t\t\t\t<\/dd><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050315_145007_132\/' title='dsc20050315_145007_132'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050315_145007_132\" title=\"dsc20050315_145007_132\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050604_133440_3421\/' title='dsc20050604_133440_3421'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050604_133440_3421\" title=\"dsc20050604_133440_3421\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050727_091048_222\/' title='dsc20050727_091048_222'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050727_091048_222\" title=\"dsc20050727_091048_222\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050813_115856_52\/' title='dsc20050813_115856_52'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050813_115856_52\" title=\"dsc20050813_115856_52\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050831_165238_332\/' title='dsc20050831_165238_332'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050831_165238_332\" title=\"dsc20050831_165238_332\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050901_105100_212\/' title='dsc20050901_105100_212'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg\" class=\"attachment-thumbnail\" alt=\"Seed pods on stem, Woodvale\" title=\"dsc20050901_105100_212\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption'>\n\t\t\t\tSeed pods on stem, Woodvale\n\t\t\t\t<\/dd><\/dl>\n\t\t\t<br style='clear: both;' \/>\n\t\t<\/div>\n\n","excerpt":"","date":"2008-06-10 07:24:14","modified":"2008-06-10 07:24:14","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":611,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","slug":"canola2","title":"canola2","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":264,"height":198}}},{"id":612,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","slug":"dsc20040724_152504_532","title":"dsc20040724_152504_532","description":"","caption":"Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":264,"height":198}}},{"id":613,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","slug":"dsc20050315_145007_132","title":"dsc20050315_145007_132","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":264,"height":198}}},{"id":615,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","slug":"dsc20050604_133440_3421","title":"dsc20050604_133440_3421","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":264,"height":198}}},{"id":616,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","slug":"dsc20050727_091048_222","title":"dsc20050727_091048_222","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":264,"height":198}}},{"id":617,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","slug":"dsc20050813_115856_52","title":"dsc20050813_115856_52","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":264,"height":198}}},{"id":618,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","slug":"dsc20050831_165238_332","title":"dsc20050831_165238_332","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":264,"height":198}}},{"id":619,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","slug":"dsc20050901_105100_212","title":"dsc20050901_105100_212","description":"","caption":"Seed pods on stem, Woodvale","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":264,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":559,"type":"post","slug":"post-format-test-aside","url":"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/","status":"publish","title":"Post Format Test: Aside","title_plain":"Post Format Test: Aside","content":"<p>\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it&#8217;s always come first, but the music ain&#8217;t worth nothing if you can&#8217;t lay it on the public. The main thing is to live for that audience, &#8217;cause what you&#8217;re there for is to please the people.\u201d<\/p>\n","excerpt":"\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it&#8217;s always come first, but the music ain&#8217;t worth nothing if you can&#8217;t lay it on the public. The main &hellip; <a href=\"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-06-09 07:51:54","modified":"2008-06-09 07:51:54","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":562,"type":"post","slug":"post-format-test-chat","url":"http:\/\/wordpress.test\/2008\/06\/08\/post-format-test-chat\/","status":"publish","title":"Post Format Test: Chat","title_plain":"Post Format Test: Chat","content":"<p>John: foo<br \/>\nMary: bar<br \/>\nJohn: foo 2<\/p>\n","excerpt":"John: foo Mary: bar John: foo 2","date":"2008-06-08 07:59:31","modified":"2008-06-08 07:59:31","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":565,"type":"post","slug":"post-format-test-link","url":"http:\/\/wordpress.test\/2008\/06\/07\/post-format-test-link\/","status":"publish","title":"Post Format Test: Link","title_plain":"Post Format Test: Link","content":"<p><a href=\"http:\/\/make.wordpress.org\/themes\" title=\"The WordPress Theme Review Team Website\">The WordPress Theme Review Team Website<\/a><\/p>\n","excerpt":"The WordPress Theme Review Team Website","date":"2008-06-07 08:06:53","modified":"2008-06-07 08:06:53","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":674,"type":"post","slug":"post-format-test-image-attached","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-attached\/","status":"publish","title":"Post Format Test: Image (Attached)","title_plain":"Post Format Test: Image (Attached)","content":"<div id=\"attachment_675\" class=\"wp-caption aligncenter\" style=\"width: 445px\"><a href=\"http:\/\/wpthemetestdata.wordpress.com\/2008\/06\/06\/post-format-test-image-attached\/boat-2\/\" rel=\"attachment wp-att-675\"><img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg\" alt=\"boat\" title=\"boat\" width=\"435\" height=\"288\" class=\"size-full wp-image-675\" \/><\/a><p class=\"wp-caption-text\">A picture is worth a thousand words<\/p><\/div>\n","excerpt":"","date":"2008-06-06 09:42:19","modified":"2008-06-06 09:42:19","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":675,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","slug":"boat-2","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":674,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":568,"type":"post","slug":"post-format-test-image-linked","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-linked\/","status":"publish","title":"Post Format Test: Image (Linked)","title_plain":"Post Format Test: Image (Linked)","content":"<div id=\"attachment_612\" class=\"wp-caption aligncenter\" style=\"width: 650px\"><a href=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\"><img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\" alt=\"chunk of resinous blackboy husk\" title=\"dsc20040724_152504_532\" width=\"640\" height=\"480\" class=\"size-full wp-image-612\" \/><\/a><p class=\"wp-caption-text\">Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.<\/p><\/div>\n","excerpt":"","date":"2008-06-06 08:09:39","modified":"2008-06-06 08:09:39","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":575,"type":"post","slug":"post-format-test-quote","url":"http:\/\/wordpress.test\/2008\/06\/05\/post-format-test-quote\/","status":"publish","title":"Post Format Test: Quote","title_plain":"Post Format Test: Quote","content":"<blockquote><p>Only one thing is impossible for God: To find any sense in any copyright law on the planet.<br \/>\n<cite><a href=\"http:\/\/www.brainyquote.com\/quotes\/quotes\/m\/marktwain163473.html\">Mark Twain<\/a><\/cite><\/p><\/blockquote>\n","excerpt":"Only one thing is impossible for God: To find any sense in any copyright law on the planet. Mark Twain","date":"2008-06-05 08:13:15","modified":"2008-06-05 08:13:15","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]}
 
 
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
+ $http->get('http://wordpress.test/?json=core.get_author_posts&author_slug=themedemos&page=2');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $author = $response->author;
12
+ $post = $response->posts[0];
13
+
14
+ echo "Response status: $response->status\n";
15
+ echo "Post count: $response->count\n";
16
+ echo "First post title: $post->title\n";
17
 
18
  ?>
19
  --EXPECT--
20
+ Response status: ok
21
+ Post count: 10
22
+ First post title: Template: Paginated
tests/core.get_author_posts-03.phpt CHANGED
@@ -5,10 +5,18 @@ core.get_author_posts by id
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
- $http->get('http://wordpress.test/?json=core.get_author_posts&id=3');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","count":10,"pages":3,"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, &#8220;Oh, why can&#8217;t you remain like this for ever!&#8221; This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"right-align-no-caption\">Right-align, no caption<\/h3>\n<p>Right-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignright size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"no-alignment-no-caption\">No alignment, no caption<\/h3>\n<p>None-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignnone size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":555,"type":"post","slug":"post-format-test-gallery","url":"http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/","status":"publish","title":"Post Format Test: Gallery","title_plain":"Post Format Test: Gallery","content":"\n\t\t<div id='gallery-1' class='gallery galleryid-555 gallery-columns-3 gallery-size-thumbnail'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/canola2\/' title='canola2'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg\" class=\"attachment-thumbnail\" alt=\"canola\" title=\"canola2\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20040724_152504_532\/' title='dsc20040724_152504_532'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\" class=\"attachment-thumbnail\" alt=\"chunk of resinous blackboy husk\" title=\"dsc20040724_152504_532\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption'>\n\t\t\t\tChunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.\n\t\t\t\t<\/dd><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050315_145007_132\/' title='dsc20050315_145007_132'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050315_145007_132\" title=\"dsc20050315_145007_132\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050604_133440_3421\/' title='dsc20050604_133440_3421'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050604_133440_3421\" title=\"dsc20050604_133440_3421\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050727_091048_222\/' title='dsc20050727_091048_222'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050727_091048_222\" title=\"dsc20050727_091048_222\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050813_115856_52\/' title='dsc20050813_115856_52'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050813_115856_52\" title=\"dsc20050813_115856_52\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050831_165238_332\/' title='dsc20050831_165238_332'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050831_165238_332\" title=\"dsc20050831_165238_332\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050901_105100_212\/' title='dsc20050901_105100_212'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg\" class=\"attachment-thumbnail\" alt=\"Seed pods on stem, Woodvale\" title=\"dsc20050901_105100_212\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption'>\n\t\t\t\tSeed pods on stem, Woodvale\n\t\t\t\t<\/dd><\/dl>\n\t\t\t<br style='clear: both;' \/>\n\t\t<\/div>\n\n","excerpt":"","date":"2008-06-10 07:24:14","modified":"2008-06-10 07:24:14","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":611,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","slug":"canola2","title":"canola2","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":264,"height":198}}},{"id":612,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","slug":"dsc20040724_152504_532","title":"dsc20040724_152504_532","description":"","caption":"Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":264,"height":198}}},{"id":613,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","slug":"dsc20050315_145007_132","title":"dsc20050315_145007_132","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":264,"height":198}}},{"id":615,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","slug":"dsc20050604_133440_3421","title":"dsc20050604_133440_3421","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":264,"height":198}}},{"id":616,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","slug":"dsc20050727_091048_222","title":"dsc20050727_091048_222","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":264,"height":198}}},{"id":617,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","slug":"dsc20050813_115856_52","title":"dsc20050813_115856_52","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":264,"height":198}}},{"id":618,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","slug":"dsc20050831_165238_332","title":"dsc20050831_165238_332","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":264,"height":198}}},{"id":619,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","slug":"dsc20050901_105100_212","title":"dsc20050901_105100_212","description":"","caption":"Seed pods on stem, Woodvale","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":264,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":559,"type":"post","slug":"post-format-test-aside","url":"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/","status":"publish","title":"Post Format Test: Aside","title_plain":"Post Format Test: Aside","content":"<p>\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it&#8217;s always come first, but the music ain&#8217;t worth nothing if you can&#8217;t lay it on the public. The main thing is to live for that audience, &#8217;cause what you&#8217;re there for is to please the people.\u201d<\/p>\n","excerpt":"\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it&#8217;s always come first, but the music ain&#8217;t worth nothing if you can&#8217;t lay it on the public. The main &hellip; <a href=\"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-06-09 07:51:54","modified":"2008-06-09 07:51:54","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":562,"type":"post","slug":"post-format-test-chat","url":"http:\/\/wordpress.test\/2008\/06\/08\/post-format-test-chat\/","status":"publish","title":"Post Format Test: Chat","title_plain":"Post Format Test: Chat","content":"<p>John: foo<br \/>\nMary: bar<br \/>\nJohn: foo 2<\/p>\n","excerpt":"John: foo Mary: bar John: foo 2","date":"2008-06-08 07:59:31","modified":"2008-06-08 07:59:31","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":565,"type":"post","slug":"post-format-test-link","url":"http:\/\/wordpress.test\/2008\/06\/07\/post-format-test-link\/","status":"publish","title":"Post Format Test: Link","title_plain":"Post Format Test: Link","content":"<p><a href=\"http:\/\/make.wordpress.org\/themes\" title=\"The WordPress Theme Review Team Website\">The WordPress Theme Review Team Website<\/a><\/p>\n","excerpt":"The WordPress Theme Review Team Website","date":"2008-06-07 08:06:53","modified":"2008-06-07 08:06:53","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":674,"type":"post","slug":"post-format-test-image-attached","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-attached\/","status":"publish","title":"Post Format Test: Image (Attached)","title_plain":"Post Format Test: Image (Attached)","content":"<div id=\"attachment_675\" class=\"wp-caption aligncenter\" style=\"width: 445px\"><a href=\"http:\/\/wpthemetestdata.wordpress.com\/2008\/06\/06\/post-format-test-image-attached\/boat-2\/\" rel=\"attachment wp-att-675\"><img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg\" alt=\"boat\" title=\"boat\" width=\"435\" height=\"288\" class=\"size-full wp-image-675\" \/><\/a><p class=\"wp-caption-text\">A picture is worth a thousand words<\/p><\/div>\n","excerpt":"","date":"2008-06-06 09:42:19","modified":"2008-06-06 09:42:19","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":675,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","slug":"boat-2","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":674,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":568,"type":"post","slug":"post-format-test-image-linked","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-linked\/","status":"publish","title":"Post Format Test: Image (Linked)","title_plain":"Post Format Test: Image (Linked)","content":"<div id=\"attachment_612\" class=\"wp-caption aligncenter\" style=\"width: 650px\"><a href=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\"><img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\" alt=\"chunk of resinous blackboy husk\" title=\"dsc20040724_152504_532\" width=\"640\" height=\"480\" class=\"size-full wp-image-612\" \/><\/a><p class=\"wp-caption-text\">Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.<\/p><\/div>\n","excerpt":"","date":"2008-06-06 08:09:39","modified":"2008-06-06 08:09:39","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":575,"type":"post","slug":"post-format-test-quote","url":"http:\/\/wordpress.test\/2008\/06\/05\/post-format-test-quote\/","status":"publish","title":"Post Format Test: Quote","title_plain":"Post Format Test: Quote","content":"<blockquote><p>Only one thing is impossible for God: To find any sense in any copyright law on the planet.<br \/>\n<cite><a href=\"http:\/\/www.brainyquote.com\/quotes\/quotes\/m\/marktwain163473.html\">Mark Twain<\/a><\/cite><\/p><\/blockquote>\n","excerpt":"Only one thing is impossible for God: To find any sense in any copyright law on the planet. Mark Twain","date":"2008-06-05 08:13:15","modified":"2008-06-05 08:13:15","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]}
 
 
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
+ $http->get('http://wordpress.test/?json=core.get_author_posts&id=2&count=20');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $author = $response->author;
12
+ $post = $response->posts[0];
13
+
14
+ echo "Response status: $response->status\n";
15
+ echo "Post count: $response->count\n";
16
+ echo "First post title: $post->title\n";
17
 
18
  ?>
19
  --EXPECT--
20
+ Response status: ok
21
+ Post count: 20
22
+ First post title: Markup: HTML Tags and Formatting
tests/core.get_author_posts-04.phpt DELETED
@@ -1,14 +0,0 @@
1
- --TEST--
2
- core.get_author_posts by author_id
3
- --FILE--
4
- <?php
5
-
6
- require_once 'HTTP/Client.php';
7
- $http = new HTTP_Client();
8
- $http->get('http://wordpress.test/?json=core.get_author_posts&author_id=3');
9
- $response = $http->currentResponse();
10
- echo $response['body'];
11
-
12
- ?>
13
- --EXPECT--
14
- {"status":"ok","count":10,"pages":3,"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, &#8220;Oh, why can&#8217;t you remain like this for ever!&#8221; This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"right-align-no-caption\">Right-align, no caption<\/h3>\n<p>Right-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignright size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"no-alignment-no-caption\">No alignment, no caption<\/h3>\n<p>None-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignnone size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":555,"type":"post","slug":"post-format-test-gallery","url":"http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/","status":"publish","title":"Post Format Test: Gallery","title_plain":"Post Format Test: Gallery","content":"\n\t\t<div id='gallery-1' class='gallery galleryid-555 gallery-columns-3 gallery-size-thumbnail'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/canola2\/' title='canola2'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg\" class=\"attachment-thumbnail\" alt=\"canola\" title=\"canola2\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20040724_152504_532\/' title='dsc20040724_152504_532'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\" class=\"attachment-thumbnail\" alt=\"chunk of resinous blackboy husk\" title=\"dsc20040724_152504_532\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption'>\n\t\t\t\tChunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.\n\t\t\t\t<\/dd><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050315_145007_132\/' title='dsc20050315_145007_132'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050315_145007_132\" title=\"dsc20050315_145007_132\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050604_133440_3421\/' title='dsc20050604_133440_3421'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050604_133440_3421\" title=\"dsc20050604_133440_3421\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050727_091048_222\/' title='dsc20050727_091048_222'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050727_091048_222\" title=\"dsc20050727_091048_222\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050813_115856_52\/' title='dsc20050813_115856_52'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050813_115856_52\" title=\"dsc20050813_115856_52\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050831_165238_332\/' title='dsc20050831_165238_332'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050831_165238_332\" title=\"dsc20050831_165238_332\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050901_105100_212\/' title='dsc20050901_105100_212'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg\" class=\"attachment-thumbnail\" alt=\"Seed pods on stem, Woodvale\" title=\"dsc20050901_105100_212\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption'>\n\t\t\t\tSeed pods on stem, Woodvale\n\t\t\t\t<\/dd><\/dl>\n\t\t\t<br style='clear: both;' \/>\n\t\t<\/div>\n\n","excerpt":"","date":"2008-06-10 07:24:14","modified":"2008-06-10 07:24:14","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":611,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","slug":"canola2","title":"canola2","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":264,"height":198}}},{"id":612,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","slug":"dsc20040724_152504_532","title":"dsc20040724_152504_532","description":"","caption":"Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":264,"height":198}}},{"id":613,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","slug":"dsc20050315_145007_132","title":"dsc20050315_145007_132","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":264,"height":198}}},{"id":615,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","slug":"dsc20050604_133440_3421","title":"dsc20050604_133440_3421","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":264,"height":198}}},{"id":616,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","slug":"dsc20050727_091048_222","title":"dsc20050727_091048_222","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":264,"height":198}}},{"id":617,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","slug":"dsc20050813_115856_52","title":"dsc20050813_115856_52","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":264,"height":198}}},{"id":618,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","slug":"dsc20050831_165238_332","title":"dsc20050831_165238_332","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":264,"height":198}}},{"id":619,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","slug":"dsc20050901_105100_212","title":"dsc20050901_105100_212","description":"","caption":"Seed pods on stem, Woodvale","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":264,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":559,"type":"post","slug":"post-format-test-aside","url":"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/","status":"publish","title":"Post Format Test: Aside","title_plain":"Post Format Test: Aside","content":"<p>\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it&#8217;s always come first, but the music ain&#8217;t worth nothing if you can&#8217;t lay it on the public. The main thing is to live for that audience, &#8217;cause what you&#8217;re there for is to please the people.\u201d<\/p>\n","excerpt":"\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it&#8217;s always come first, but the music ain&#8217;t worth nothing if you can&#8217;t lay it on the public. The main &hellip; <a href=\"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-06-09 07:51:54","modified":"2008-06-09 07:51:54","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":562,"type":"post","slug":"post-format-test-chat","url":"http:\/\/wordpress.test\/2008\/06\/08\/post-format-test-chat\/","status":"publish","title":"Post Format Test: Chat","title_plain":"Post Format Test: Chat","content":"<p>John: foo<br \/>\nMary: bar<br \/>\nJohn: foo 2<\/p>\n","excerpt":"John: foo Mary: bar John: foo 2","date":"2008-06-08 07:59:31","modified":"2008-06-08 07:59:31","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":565,"type":"post","slug":"post-format-test-link","url":"http:\/\/wordpress.test\/2008\/06\/07\/post-format-test-link\/","status":"publish","title":"Post Format Test: Link","title_plain":"Post Format Test: Link","content":"<p><a href=\"http:\/\/make.wordpress.org\/themes\" title=\"The WordPress Theme Review Team Website\">The WordPress Theme Review Team Website<\/a><\/p>\n","excerpt":"The WordPress Theme Review Team Website","date":"2008-06-07 08:06:53","modified":"2008-06-07 08:06:53","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":674,"type":"post","slug":"post-format-test-image-attached","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-attached\/","status":"publish","title":"Post Format Test: Image (Attached)","title_plain":"Post Format Test: Image (Attached)","content":"<div id=\"attachment_675\" class=\"wp-caption aligncenter\" style=\"width: 445px\"><a href=\"http:\/\/wpthemetestdata.wordpress.com\/2008\/06\/06\/post-format-test-image-attached\/boat-2\/\" rel=\"attachment wp-att-675\"><img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg\" alt=\"boat\" title=\"boat\" width=\"435\" height=\"288\" class=\"size-full wp-image-675\" \/><\/a><p class=\"wp-caption-text\">A picture is worth a thousand words<\/p><\/div>\n","excerpt":"","date":"2008-06-06 09:42:19","modified":"2008-06-06 09:42:19","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":675,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","slug":"boat-2","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":674,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":568,"type":"post","slug":"post-format-test-image-linked","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-linked\/","status":"publish","title":"Post Format Test: Image (Linked)","title_plain":"Post Format Test: Image (Linked)","content":"<div id=\"attachment_612\" class=\"wp-caption aligncenter\" style=\"width: 650px\"><a href=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\"><img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\" alt=\"chunk of resinous blackboy husk\" title=\"dsc20040724_152504_532\" width=\"640\" height=\"480\" class=\"size-full wp-image-612\" \/><\/a><p class=\"wp-caption-text\">Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.<\/p><\/div>\n","excerpt":"","date":"2008-06-06 08:09:39","modified":"2008-06-06 08:09:39","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":575,"type":"post","slug":"post-format-test-quote","url":"http:\/\/wordpress.test\/2008\/06\/05\/post-format-test-quote\/","status":"publish","title":"Post Format Test: Quote","title_plain":"Post Format Test: Quote","content":"<blockquote><p>Only one thing is impossible for God: To find any sense in any copyright law on the planet.<br \/>\n<cite><a href=\"http:\/\/www.brainyquote.com\/quotes\/quotes\/m\/marktwain163473.html\">Mark Twain<\/a><\/cite><\/p><\/blockquote>\n","excerpt":"Only one thing is impossible for God: To find any sense in any copyright law on the planet. Mark Twain","date":"2008-06-05 08:13:15","modified":"2008-06-05 08:13:15","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/core.get_category_index-01.phpt CHANGED
@@ -7,8 +7,15 @@ require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_category_index');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","count":44,"categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":4,"slug":"antiquarianism","title":"antiquarianism","description":"","parent":0,"post_count":1},{"id":5,"slug":"arrangement","title":"arrangement","description":"","parent":0,"post_count":1},{"id":6,"slug":"asmodeus","title":"asmodeus","description":"","parent":0,"post_count":1},{"id":7,"slug":"broder","title":"broder","description":"","parent":0,"post_count":1},{"id":8,"slug":"buying","title":"buying","description":"","parent":0,"post_count":1},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":12,"slug":"championship","title":"championship","description":"","parent":0,"post_count":1},{"id":13,"slug":"chastening","title":"chastening","description":"","parent":0,"post_count":1},{"id":14,"slug":"clerkship","title":"clerkship","description":"","parent":0,"post_count":1},{"id":15,"slug":"disinclination","title":"disinclination","description":"","parent":0,"post_count":1},{"id":16,"slug":"disinfection","title":"disinfection","description":"","parent":0,"post_count":1},{"id":17,"slug":"dispatch","title":"dispatch","description":"","parent":0,"post_count":1},{"id":18,"slug":"echappee","title":"echappee","description":"","parent":0,"post_count":1},{"id":19,"slug":"enphagy","title":"enphagy","description":"","parent":0,"post_count":1},{"id":20,"slug":"equipollent","title":"equipollent","description":"","parent":0,"post_count":1},{"id":21,"slug":"fatuity","title":"fatuity","description":"","parent":0,"post_count":1},{"id":24,"slug":"gaberlunzie","title":"gaberlunzie","description":"","parent":0,"post_count":1},{"id":25,"slug":"illtempered","title":"illtempered","description":"","parent":0,"post_count":1},{"id":26,"slug":"insubordination","title":"insubordination","description":"","parent":0,"post_count":1},{"id":27,"slug":"lender","title":"lender","description":"","parent":0,"post_count":1},{"id":28,"slug":"monosyllable","title":"monosyllable","description":"","parent":0,"post_count":1},{"id":29,"slug":"packthread","title":"packthread","description":"","parent":0,"post_count":1},{"id":30,"slug":"palter","title":"palter","description":"","parent":0,"post_count":1},{"id":31,"slug":"papilionaceous","title":"papilionaceous","description":"","parent":0,"post_count":1},{"id":33,"slug":"personable","title":"personable","description":"","parent":0,"post_count":1},{"id":34,"slug":"propylaeum","title":"propylaeum","description":"","parent":0,"post_count":1},{"id":35,"slug":"pustule","title":"pustule","description":"","parent":0,"post_count":1},{"id":36,"slug":"quartern","title":"quartern","description":"","parent":0,"post_count":1},{"id":37,"slug":"scholarship","title":"scholarship","description":"","parent":0,"post_count":1},{"id":38,"slug":"selfconvicted","title":"selfconvicted","description":"","parent":0,"post_count":1},{"id":39,"slug":"showshoe","title":"showshoe","description":"","parent":0,"post_count":1},{"id":40,"slug":"sloyd","title":"sloyd","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1},{"id":42,"slug":"sublunary","title":"sublunary","description":"","parent":0,"post_count":1},{"id":43,"slug":"tamtam","title":"tamtam","description":"","parent":0,"post_count":1},{"id":44,"slug":"weakhearted","title":"weakhearted","description":"","parent":0,"post_count":1},{"id":45,"slug":"ween","title":"ween","description":"","parent":0,"post_count":1},{"id":46,"slug":"wellhead","title":"wellhead","description":"","parent":0,"post_count":1},{"id":47,"slug":"wellintentioned","title":"wellintentioned","description":"","parent":0,"post_count":1},{"id":48,"slug":"whetstone","title":"whetstone","description":"","parent":0,"post_count":1},{"id":49,"slug":"years","title":"years","description":"","parent":0,"post_count":1}]}
 
 
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_category_index');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $category = $response->categories[0];
12
+
13
+ echo "Response status: $response->status\n";
14
+ echo "Category count: $response->count\n";
15
+ echo "Category name: $category->title\n";
16
 
17
  ?>
18
  --EXPECT--
19
+ Response status: ok
20
+ Category count: 63
21
+ Category name: aciform
tests/core.get_category_posts-01.phpt CHANGED
@@ -5,10 +5,17 @@ core.get_category_posts default
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
- $http->get('http://wordpress.test/?json=core.get_category_posts&slug=cat-a');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","count":2,"pages":1,"category":{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, &#8220;Oh, why can&#8217;t you remain like this for ever!&#8221; This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]}
 
 
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
+ $http->get('http://wordpress.test/?json=core.get_category_posts&slug=markup');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $post = $response->posts[0];
12
+
13
+ echo "Response status: $response->status\n";
14
+ echo "Post count: $response->count\n";
15
+ echo "Post title: $post->title\n";
16
 
17
  ?>
18
  --EXPECT--
19
+ Response status: ok
20
+ Post count: 6
21
+ Post title: Markup: HTML Tags and Formatting
tests/core.get_date_index-01.phpt CHANGED
@@ -7,8 +7,74 @@ require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_date_index');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","permalinks":["http:\/\/wordpress.test\/2008\/09\/","http:\/\/wordpress.test\/2008\/06\/","http:\/\/wordpress.test\/2008\/05\/","http:\/\/wordpress.test\/2008\/04\/","http:\/\/wordpress.test\/2008\/03\/"],"tree":{"2008":{"09":"3","06":"10","05":"5","04":"1","03":"3"}}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_date_index');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $count = count($response->permalinks);
12
+
13
+ echo "Response status: $response->status\n";
14
+ echo "Permalink count: $count\n";
15
+ echo "Tree:\n";
16
+ var_dump($response->tree);
17
+
18
 
19
  ?>
20
  --EXPECT--
21
+ Response status: ok
22
+ Permalink count: 20
23
+ Tree:
24
+ object(stdClass)#5 (5) {
25
+ ["2013"]=>
26
+ object(stdClass)#6 (1) {
27
+ ["01"]=>
28
+ string(1) "5"
29
+ }
30
+ ["2012"]=>
31
+ object(stdClass)#4 (2) {
32
+ ["03"]=>
33
+ string(1) "5"
34
+ ["01"]=>
35
+ string(1) "6"
36
+ }
37
+ ["2011"]=>
38
+ object(stdClass)#7 (1) {
39
+ ["03"]=>
40
+ string(1) "1"
41
+ }
42
+ ["2010"]=>
43
+ object(stdClass)#8 (10) {
44
+ ["10"]=>
45
+ string(1) "1"
46
+ ["09"]=>
47
+ string(1) "2"
48
+ ["08"]=>
49
+ string(1) "3"
50
+ ["07"]=>
51
+ string(1) "1"
52
+ ["06"]=>
53
+ string(1) "3"
54
+ ["05"]=>
55
+ string(1) "1"
56
+ ["04"]=>
57
+ string(1) "1"
58
+ ["03"]=>
59
+ string(1) "1"
60
+ ["02"]=>
61
+ string(1) "1"
62
+ ["01"]=>
63
+ string(1) "1"
64
+ }
65
+ ["2009"]=>
66
+ object(stdClass)#9 (6) {
67
+ ["10"]=>
68
+ string(1) "1"
69
+ ["09"]=>
70
+ string(1) "1"
71
+ ["08"]=>
72
+ string(1) "1"
73
+ ["07"]=>
74
+ string(1) "1"
75
+ ["06"]=>
76
+ string(1) "1"
77
+ ["05"]=>
78
+ string(1) "1"
79
+ }
80
+ }
tests/core.get_date_posts-01.phpt CHANGED
@@ -5,10 +5,17 @@ core.get_date_posts by day
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
- $http->get('http://wordpress.test/?json=core.get_date_posts&date=2008-09-05');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","count":1,"count_total":1,"pages":1,"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, &#8220;Oh, why can&#8217;t you remain like this for ever!&#8221; This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]}
 
 
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
+ $http->get('http://wordpress.test/?json=core.get_date_posts&date=2013-01');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $post = $response->posts[0];
12
+
13
+ echo "Response status: $response->status\n";
14
+ echo "Post count: $response->count\n";
15
+ echo "Post title: $post->title\n";
16
 
17
  ?>
18
  --EXPECT--
19
+ Response status: ok
20
+ Post count: 5
21
+ Post title: Markup: HTML Tags and Formatting
tests/core.get_date_posts-02.phpt CHANGED
@@ -5,10 +5,17 @@ core.get_date_posts by month
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
- $http->get('http://wordpress.test/?json=core.get_date_posts&date=2008-09');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","count":3,"count_total":3,"pages":1,"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, &#8220;Oh, why can&#8217;t you remain like this for ever!&#8221; This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"right-align-no-caption\">Right-align, no caption<\/h3>\n<p>Right-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignright size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"no-alignment-no-caption\">No alignment, no caption<\/h3>\n<p>None-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignnone size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"}]}
 
 
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
+ $http->get('http://wordpress.test/?json=core.get_date_posts&date=2013-01');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $post = $response->posts[0];
12
+
13
+ echo "Response status: $response->status\n";
14
+ echo "Post count: $response->count\n";
15
+ echo "Post title: $post->title\n";
16
 
17
  ?>
18
  --EXPECT--
19
+ Response status: ok
20
+ Post count: 5
21
+ Post title: Markup: HTML Tags and Formatting
tests/core.get_date_posts-03.phpt CHANGED
@@ -5,10 +5,17 @@ core.get_date_posts by year
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
- $http->get('http://wordpress.test/?json=core.get_date_posts&date=2008-09');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","count":3,"count_total":3,"pages":1,"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, &#8220;Oh, why can&#8217;t you remain like this for ever!&#8221; This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"right-align-no-caption\">Right-align, no caption<\/h3>\n<p>Right-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignright size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"no-alignment-no-caption\">No alignment, no caption<\/h3>\n<p>None-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignnone size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"}]}
 
 
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
+ $http->get('http://wordpress.test/?json=core.get_date_posts&date=2012');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $post = $response->posts[0];
12
+
13
+ echo "Response status: $response->status\n";
14
+ echo "Post count: $response->count\n";
15
+ echo "Post title: $post->title\n";
16
 
17
  ?>
18
  --EXPECT--
19
+ Response status: ok
20
+ Post count: 10
21
+ Post title: Template: Featured Image (Vertical)
tests/core.get_page-01.phpt CHANGED
@@ -7,8 +7,13 @@ require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_page&slug=about');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","page":{"id":686,"type":"page","slug":"about","url":"http:\/\/wordpress.test\/about\/","status":"publish","title":"About The Tests","title_plain":"About The Tests","content":"<p>This site is using the standard WordPress Theme Unit Test Data for content. The Theme Unit Test is a series of posts and pages that match up with a checklist on the WordPress codex. You can use the data and checklist together to test your theme.<\/p>\n<h2>WordPress Theme Development Resources<\/h2>\n<ol>\n<li>See <a href=\"http:\/\/codex.wordpress.org\/Theme_Development\">Theme Development<\/a> for <a href=\"http:\/\/codex.wordpress.org\/Theme_Development#Code_Standards\">code standards<\/a>, examples of best practices, and <a href=\"http:\/\/codex.wordpress.org\/Theme_Development#Resources_and_References\">resources for Theme development<\/a>.<\/li>\n<li>See <a href=\"http:\/\/codex.wordpress.org\/Theme_Unit_Test\">Theme Unit Test<\/a> for a robust test suite for your Theme and get the latest version of the test data you see here.<\/li>\n<li>See <a href=\"http:\/\/codex.wordpress.org\/Theme_Review\">Theme Review<\/a> for a guide to submitting your Theme to the <a href=\"http:\/\/wordpress.org\/extend\/themes\/\">Themes Directory<\/a>.<\/li>\n<\/ol>\n","excerpt":"This site is using the standard WordPress Theme Unit Test Data for content. The Theme Unit Test is a series of posts and pages that match up with a checklist on the WordPress codex. You can use the data and &hellip; <a href=\"http:\/\/wordpress.test\/about\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2010-07-25 19:40:01","modified":"2010-07-25 19:40:01","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}}
 
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_page&slug=about');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+
12
+ echo "Response status: $response->status\n";
13
+ echo "Page title: {$response->page->title}\n";
14
+
15
 
16
  ?>
17
  --EXPECT--
18
+ Response status: ok
19
+ Page title: About The Tests
tests/core.get_page-02.phpt CHANGED
@@ -7,8 +7,19 @@ require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_page&slug=level-1&children=1');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
 
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","page":{"id":174,"type":"page","slug":"level-1","url":"http:\/\/wordpress.test\/level-1\/","status":"publish","title":"Level 1","title_plain":"Level 1","content":"<p>Level 1 of the reverse hierarchy test. This is to make sure the importer correctly assigns parents and children even when the children come first in the export file.<\/p>\n","excerpt":"Level 1 of the reverse hierarchy test. This is to make sure the importer correctly assigns parents and children even when the children come first in the export file.","date":"2007-12-11 16:25:40","modified":"2007-12-11 16:25:40","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed","children":[{"id":173,"type":"page","slug":"level-2","url":"http:\/\/wordpress.test\/level-1\/level-2\/","status":"publish","title":"Level 2","title_plain":"Level 2","content":"<p>Level 2 of the reverse hierarchy test.<\/p>\n","excerpt":"Level 2 of the reverse hierarchy test.","date":"2007-12-11 16:25:40","modified":"2007-12-11 16:23:33","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed","children":[{"id":172,"type":"page","slug":"level-3","url":"http:\/\/wordpress.test\/level-1\/level-2\/level-3\/","status":"publish","title":"Level 3","title_plain":"Level 3","content":"<p>Level 3 of the reverse hierarchy test.<\/p>\n","excerpt":"Level 3 of the reverse hierarchy test.","date":"2007-12-11 16:25:40","modified":"2007-12-11 16:23:16","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed","children":[]}]}]}}
 
 
 
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_page&slug=level-1&children=1');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $page = $response->page;
12
+ $child = $page->children[0];
13
+ $grandchild = $child->children[0];
14
+
15
+ echo "Response status: $response->status\n";
16
+ echo "Page title: $page->title\n";
17
+ echo "Child title: $child->title\n";
18
+ echo "Grandchild title: $grandchild->title\n";
19
 
20
  ?>
21
  --EXPECT--
22
+ Response status: ok
23
+ Page title: Level 1
24
+ Child title: Level 2
25
+ Grandchild title: Level 3
tests/core.get_post-01.phpt CHANGED
@@ -5,10 +5,14 @@ core.get_post default
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
- $http->get('http://wordpress.test/?json=core.get_post&slug=readability-test');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","post":{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, &#8220;Oh, why can&#8217;t you remain like this for ever!&#8221; This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p><span id=\"more-358\"><\/span><\/p>\n<p>Mrs. Darling first heard of Peter when she was tidying up her children&#8217;s minds. It is the nightly custom of every good mother after her children are asleep to rummage in their minds and put things straight for next morning, repacking into their proper places the many articles that have wandered during the day.<\/p>\n<p>If you could keep awake (but of course you can&#8217;t) you would see your own mother doing this, and you would find it very interesting to watch her. It is quite like tidying up drawers. You would see her on her knees, I expect, lingering humorously over some of your contents, wondering where on earth you had picked this thing up, making discoveries sweet and not so sweet, pressing this to her cheek as if it were as nice as a kitten, and hurriedly stowing that out of sight. When you wake in the morning, the naughtiness and evil passions with which you went to bed have been folded up small and placed at the bottom of your mind and on the top, beautifully aired, are spread out your prettier thoughts, ready for you to put on.<\/p>\n<p>I don&#8217;t know whether you have ever seen a map of a person&#8217;s mind. Doctors sometimes draw maps of other parts of you, and your own map can become intensely interesting, but catch them trying to draw a map of a child&#8217;s mind, which is not only confused, but keeps going round all the time. There are zigzag lines on it, just like your temperature on a card, and these are probably roads in the island, for the Neverland is always more or less an island, with astonishing splashes of colour here and there, and coral reefs and rakish-looking craft in the offing, and savages and lonely lairs, and gnomes who are mostly tailors, and caves through which a river runs, and princes with six elder brothers, and a hut fast going to decay, and one very small old lady with a hooked nose. It would be an easy map if that were all, but there is also first day at school, religion, fathers, the round pond, needle-work, murders, hangings, verbs that take the dative, chocolate pudding day, getting into braces, say ninety-nine, three-pence for pulling out your tooth yourself, and so on, and either these are part of the island or they are another map showing through, and it is all rather confusing, especially as nothing will stand still.<\/p>\n<p>Of course the Neverlands vary a good deal. John&#8217;s, for instance, had a lagoon with flamingoes flying over it at which John was shooting, while Michael, who was very small, had a flamingo with lagoons flying over it. John lived in a boat turned upside down on the sands, Michael in a wigwam, Wendy in a house of leaves deftly sewn together. John had no friends, Michael had friends at night, Wendy had a pet wolf forsaken by its parents, but on the whole the Neverlands have a family resemblance, and if they stood still in a row you could say of them that they have each other&#8217;s nose, and so forth. On these magic shores children at play are for ever beaching their coracles [simple boat]. We too have been there; we can still hear the sound of the surf, though we shall land no more.<\/p>\n<p>Of all delectable islands the Neverland is the snuggest and most compact, not large and sprawly, you know, with tedious distances between one adventure and another, but nicely crammed. When you play at it by day with the chairs and table-cloth, it is not in the least alarming, but in the two minutes before you go to sleep it becomes very real. That is why there are night-lights.<\/p>\n<p>Occasionally in her travels through her children&#8217;s minds Mrs. Darling found things she could not understand, and of these quite the most perplexing was the word Peter. She knew of no Peter, and yet he was here and there in John and Michael&#8217;s minds, while Wendy&#8217;s began to be scrawled all over with him. The name stood out in bolder letters than any of the other words, and as Mrs. Darling gazed she felt that it had an oddly cocky appearance.<\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},"previous_url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/"}
 
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
+ $http->get('http://wordpress.test/?json=core.get_post&slug=markup-html-tags-and-formatting');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+
12
+ echo "Response status: $response->status\n";
13
+ echo "post title: {$response->post->title}\n";
14
 
15
  ?>
16
  --EXPECT--
17
+ Response status: ok
18
+ post title: Markup: HTML Tags and Formatting
tests/core.get_posts-01.phpt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --TEST--
2
+ core.get_posts default
3
+ --FILE--
4
+ <?php
5
+
6
+ require_once 'HTTP/Client.php';
7
+ $http = new HTTP_Client();
8
+ $http->get('http://wordpress.test/?json=core.get_posts');
9
+ $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $post = $response->posts[0];
12
+
13
+ echo "Response status: $response->status\n";
14
+ echo "Post count: $response->count\n";
15
+ echo "Post title: $post->title\n";
16
+
17
+ ?>
18
+ --EXPECT--
19
+ Response status: ok
20
+ Post count: 10
21
+ Post title: Markup: HTML Tags and Formatting
tests/core.get_posts-02.phpt ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --TEST--
2
+ core.get_posts by meta key
3
+ --FILE--
4
+ <?php
5
+
6
+ require_once 'HTTP/Client.php';
7
+ $http = new HTTP_Client();
8
+ $http->get('http://wordpress.test/?json=core.get_posts&meta_key=enclosure');
9
+ $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $post = $response->posts[0];
12
+ $attachment = $post->attachments[0];
13
+
14
+ echo "Response status: $response->status\n";
15
+ echo "Post count: $response->count\n";
16
+ echo "Post title: $post->title\n";
17
+ echo "Attachment title: $attachment->title\n";
18
+
19
+ ?>
20
+ --EXPECT--
21
+ Response status: ok
22
+ Post count: 1
23
+ Post title: Post Format: Audio
24
+ Attachment title: St. Louis Blues
tests/core.get_posts-03.phpt ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --TEST--
2
+ core.get_posts by meta value
3
+ --FILE--
4
+ <?php
5
+
6
+ require_once 'HTTP/Client.php';
7
+ $http = new HTTP_Client();
8
+ $http->get('http://wordpress.test/?json=core.get_posts&meta_key=_wp_old_slug&meta_value=excerpt');
9
+ $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $post = $response->posts[0];
12
+
13
+ echo "Response status: $response->status\n";
14
+ echo "Post count: $response->count\n";
15
+ echo "Post title: $post->title\n";
16
+ echo "Post slug: $post->slug\n";
17
+
18
+ ?>
19
+ --EXPECT--
20
+ Response status: ok
21
+ Post count: 1
22
+ Post title: Template: Excerpt (Defined)
23
+ Post slug: template-excerpt-defined
tests/core.get_recent_posts-01.phpt CHANGED
@@ -7,8 +7,15 @@ require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_recent_posts');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","count":10,"count_total":22,"pages":3,"posts":[{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, &#8220;Oh, why can&#8217;t you remain like this for ever!&#8221; This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"right-align-no-caption\">Right-align, no caption<\/h3>\n<p>Right-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignright size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"no-alignment-no-caption\">No alignment, no caption<\/h3>\n<p>None-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignnone size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":555,"type":"post","slug":"post-format-test-gallery","url":"http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/","status":"publish","title":"Post Format Test: Gallery","title_plain":"Post Format Test: Gallery","content":"\n\t\t<div id='gallery-1' class='gallery galleryid-555 gallery-columns-3 gallery-size-thumbnail'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/canola2\/' title='canola2'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg\" class=\"attachment-thumbnail\" alt=\"canola\" title=\"canola2\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20040724_152504_532\/' title='dsc20040724_152504_532'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\" class=\"attachment-thumbnail\" alt=\"chunk of resinous blackboy husk\" title=\"dsc20040724_152504_532\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption'>\n\t\t\t\tChunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.\n\t\t\t\t<\/dd><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050315_145007_132\/' title='dsc20050315_145007_132'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050315_145007_132\" title=\"dsc20050315_145007_132\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050604_133440_3421\/' title='dsc20050604_133440_3421'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050604_133440_3421\" title=\"dsc20050604_133440_3421\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050727_091048_222\/' title='dsc20050727_091048_222'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050727_091048_222\" title=\"dsc20050727_091048_222\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050813_115856_52\/' title='dsc20050813_115856_52'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050813_115856_52\" title=\"dsc20050813_115856_52\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050831_165238_332\/' title='dsc20050831_165238_332'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050831_165238_332\" title=\"dsc20050831_165238_332\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050901_105100_212\/' title='dsc20050901_105100_212'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg\" class=\"attachment-thumbnail\" alt=\"Seed pods on stem, Woodvale\" title=\"dsc20050901_105100_212\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption'>\n\t\t\t\tSeed pods on stem, Woodvale\n\t\t\t\t<\/dd><\/dl>\n\t\t\t<br style='clear: both;' \/>\n\t\t<\/div>\n\n","excerpt":"","date":"2008-06-10 07:24:14","modified":"2008-06-10 07:24:14","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":611,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","slug":"canola2","title":"canola2","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":264,"height":198}}},{"id":612,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","slug":"dsc20040724_152504_532","title":"dsc20040724_152504_532","description":"","caption":"Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":264,"height":198}}},{"id":613,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","slug":"dsc20050315_145007_132","title":"dsc20050315_145007_132","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":264,"height":198}}},{"id":615,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","slug":"dsc20050604_133440_3421","title":"dsc20050604_133440_3421","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":264,"height":198}}},{"id":616,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","slug":"dsc20050727_091048_222","title":"dsc20050727_091048_222","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":264,"height":198}}},{"id":617,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","slug":"dsc20050813_115856_52","title":"dsc20050813_115856_52","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":264,"height":198}}},{"id":618,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","slug":"dsc20050831_165238_332","title":"dsc20050831_165238_332","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":264,"height":198}}},{"id":619,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","slug":"dsc20050901_105100_212","title":"dsc20050901_105100_212","description":"","caption":"Seed pods on stem, Woodvale","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":264,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":559,"type":"post","slug":"post-format-test-aside","url":"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/","status":"publish","title":"Post Format Test: Aside","title_plain":"Post Format Test: Aside","content":"<p>\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it&#8217;s always come first, but the music ain&#8217;t worth nothing if you can&#8217;t lay it on the public. The main thing is to live for that audience, &#8217;cause what you&#8217;re there for is to please the people.\u201d<\/p>\n","excerpt":"\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it&#8217;s always come first, but the music ain&#8217;t worth nothing if you can&#8217;t lay it on the public. The main &hellip; <a href=\"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-06-09 07:51:54","modified":"2008-06-09 07:51:54","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":562,"type":"post","slug":"post-format-test-chat","url":"http:\/\/wordpress.test\/2008\/06\/08\/post-format-test-chat\/","status":"publish","title":"Post Format Test: Chat","title_plain":"Post Format Test: Chat","content":"<p>John: foo<br \/>\nMary: bar<br \/>\nJohn: foo 2<\/p>\n","excerpt":"John: foo Mary: bar John: foo 2","date":"2008-06-08 07:59:31","modified":"2008-06-08 07:59:31","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":565,"type":"post","slug":"post-format-test-link","url":"http:\/\/wordpress.test\/2008\/06\/07\/post-format-test-link\/","status":"publish","title":"Post Format Test: Link","title_plain":"Post Format Test: Link","content":"<p><a href=\"http:\/\/make.wordpress.org\/themes\" title=\"The WordPress Theme Review Team Website\">The WordPress Theme Review Team Website<\/a><\/p>\n","excerpt":"The WordPress Theme Review Team Website","date":"2008-06-07 08:06:53","modified":"2008-06-07 08:06:53","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":674,"type":"post","slug":"post-format-test-image-attached","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-attached\/","status":"publish","title":"Post Format Test: Image (Attached)","title_plain":"Post Format Test: Image (Attached)","content":"<div id=\"attachment_675\" class=\"wp-caption aligncenter\" style=\"width: 445px\"><a href=\"http:\/\/wpthemetestdata.wordpress.com\/2008\/06\/06\/post-format-test-image-attached\/boat-2\/\" rel=\"attachment wp-att-675\"><img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg\" alt=\"boat\" title=\"boat\" width=\"435\" height=\"288\" class=\"size-full wp-image-675\" \/><\/a><p class=\"wp-caption-text\">A picture is worth a thousand words<\/p><\/div>\n","excerpt":"","date":"2008-06-06 09:42:19","modified":"2008-06-06 09:42:19","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":675,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","slug":"boat-2","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":674,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":568,"type":"post","slug":"post-format-test-image-linked","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-linked\/","status":"publish","title":"Post Format Test: Image (Linked)","title_plain":"Post Format Test: Image (Linked)","content":"<div id=\"attachment_612\" class=\"wp-caption aligncenter\" style=\"width: 650px\"><a href=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\"><img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\" alt=\"chunk of resinous blackboy husk\" title=\"dsc20040724_152504_532\" width=\"640\" height=\"480\" class=\"size-full wp-image-612\" \/><\/a><p class=\"wp-caption-text\">Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.<\/p><\/div>\n","excerpt":"","date":"2008-06-06 08:09:39","modified":"2008-06-06 08:09:39","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":575,"type":"post","slug":"post-format-test-quote","url":"http:\/\/wordpress.test\/2008\/06\/05\/post-format-test-quote\/","status":"publish","title":"Post Format Test: Quote","title_plain":"Post Format Test: Quote","content":"<blockquote><p>Only one thing is impossible for God: To find any sense in any copyright law on the planet.<br \/>\n<cite><a href=\"http:\/\/www.brainyquote.com\/quotes\/quotes\/m\/marktwain163473.html\">Mark Twain<\/a><\/cite><\/p><\/blockquote>\n","excerpt":"Only one thing is impossible for God: To find any sense in any copyright law on the planet. Mark Twain","date":"2008-06-05 08:13:15","modified":"2008-06-05 08:13:15","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]}
 
 
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_recent_posts');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $post = $response->posts[0];
12
+
13
+ echo "Response status: $response->status\n";
14
+ echo "Post count: $response->count\n";
15
+ echo "Post title: $post->title\n";
16
 
17
  ?>
18
  --EXPECT--
19
+ Response status: ok
20
+ Post count: 11
21
+ Post title: Template: Sticky
tests/core.get_recent_posts-02.phpt CHANGED
@@ -7,8 +7,15 @@ require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_recent_posts&count=3');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","count":3,"count_total":22,"pages":8,"posts":[{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, &#8220;Oh, why can&#8217;t you remain like this for ever!&#8221; This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"right-align-no-caption\">Right-align, no caption<\/h3>\n<p>Right-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignright size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"no-alignment-no-caption\">No alignment, no caption<\/h3>\n<p>None-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignnone size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"}]}
 
 
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_recent_posts&count=3');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $post = $response->posts[3];
12
+
13
+ echo "Response status: $response->status\n";
14
+ echo "Post count: $response->count\n";
15
+ echo "Post title: $post->title\n";
16
 
17
  ?>
18
  --EXPECT--
19
+ Response status: ok
20
+ Post count: 4
21
+ Post title: Markup: Text Alignment
tests/core.get_recent_posts-03.phpt CHANGED
@@ -7,8 +7,15 @@ require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_recent_posts&page=2');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","count":10,"count_total":22,"pages":3,"posts":[{"id":579,"type":"post","slug":"post-format-test-status","url":"http:\/\/wordpress.test\/2008\/06\/04\/post-format-test-status\/","status":"publish","title":"Post Format Test: Status","title_plain":"Post Format Test: Status","content":"<p>WordPress, how do I love thee? Let me count the ways (in 140 characters or less).<\/p>\n","excerpt":"WordPress, how do I love thee? Let me count the ways (in 140 characters or less).","date":"2008-06-04 08:21:24","modified":"2008-06-04 08:21:24","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":582,"type":"post","slug":"post-format-test-video","url":"http:\/\/wordpress.test\/2008\/06\/03\/post-format-test-video\/","status":"publish","title":"Post Format Test: Video","title_plain":"Post Format Test: Video","content":"<p><embed src=\"http:\/\/v.wordpress.com\/hrPKeL5t\" type=\"application\/x-shockwave-flash\" width=\"640\" height=\"360\" allowscriptaccess=\"always\" allowfullscreen=\"true\" wmode=\"transparent\"><\/embed><\/p>\n<p>Posted as per the <a href=\"http:\/\/codex.wordpress.org\/Embeds\" target=\"_blank\">instructions in the Codex<\/a>.<\/p>\n","excerpt":"Posted as per the instructions in the Codex.","date":"2008-06-03 08:25:58","modified":"2008-06-03 08:25:58","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":587,"type":"post","slug":"post-format-test-audio","url":"http:\/\/wordpress.test\/2008\/06\/02\/post-format-test-audio\/","status":"publish","title":"Post Format Test: Audio","title_plain":"Post Format Test: Audio","content":"<p><a href='http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/hayseedrag-thedizzytrio_vbr3.mp3'>Hayseed Rag \u2013 The Dizzy Trio<\/a><\/p>\n","excerpt":"Hayseed Rag \u2013 The Dizzy Trio","date":"2008-06-02 08:36:44","modified":"2008-06-02 08:36:44","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":622,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/hayseedrag-thedizzytrio_vbr3.mp3","slug":"hayseedrag-thedizzytrio_vbr-2","title":"Hayseed Rag \u2013 The Dizzy Trio","description":"Victor # 19421-B The dizzy trio -novelty fox trot \u2013 Harmonica specialty by Borrah Minevitch \u2013 Harmonica,guitar,banjo, with Jew\u2019s harp and piano \u2013 issue date: May 1924. (<a href=\"http:\/\/www.archive.org\/details\/HayseedRag\">public domain<\/a>)","caption":"Hayseed Rag \u2013 The Dizzy Trio","parent":587,"mime_type":"audio\/mpeg"}],"comment_count":0,"comment_status":"closed"},{"id":494,"type":"post","slug":"if-you-say-it-loud-enough-you%e2%80%99ll-always-sound-precocious-supercalifragilisticexpialidocious","url":"http:\/\/wordpress.test\/2008\/05\/06\/if-you-say-it-loud-enough-you%e2%80%99ll-always-sound-precocious-supercalifragilisticexpialidocious\/","status":"publish","title":"If you say it loud enough, you\u2019ll always sound precocious; Supercalifragilisticexpialidocious!","title_plain":"If you say it loud enough, you\u2019ll always sound precocious; Supercalifragilisticexpialidocious!","content":"<p>A post with an exceptionally long title and single word (supercalifragilisticexpialidocious\u2014it&#8217;s the biggest word you ever heard) useful for testing title line heights and potential overflow issues on posts with small title areas. <img src='http:\/\/wordpress.test\/wp-includes\/images\/smilies\/icon_smile.gif' alt=':)' class='wp-smiley' \/> <\/p>\n","excerpt":"A post with an exceptionally long title and single word (supercalifragilisticexpialidocious\u2014it&#8217;s the biggest word you ever heard) useful for testing title line heights and potential overflow issues on posts with small title areas.","date":"2008-05-06 12:23:00","modified":"2008-05-06 12:23:00","categories":[],"tags":[],"author":{"id":4,"slug":"ian-stewart","name":"Ian Stewart","first_name":"","last_name":"","nickname":"Ian Stewart","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":134,"type":"post","slug":"this-post-has-no-body","url":"http:\/\/wordpress.test\/2008\/05\/05\/this-post-has-no-body\/","status":"publish","title":"This post has no body","title_plain":"This post has no body","content":"","excerpt":"","date":"2008-05-05 09:39:56","modified":"2008-05-05 09:39:56","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":133,"type":"post","slug":"14","url":"http:\/\/wordpress.test\/2008\/05\/04\/14\/","status":"publish","title":"","title_plain":"","content":"<p>This Post has no Post Title, but must still display a link to the single-page Post view.<\/p>\n","excerpt":"This Post has no Post Title, but must still display a link to the single-page Post view.","date":"2008-05-04 09:39:23","modified":"2008-05-04 09:39:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":168,"type":"post","slug":"many-categories","url":"http:\/\/wordpress.test\/2008\/05\/03\/many-categories\/","status":"publish","title":"Many Categories","title_plain":"Many Categories","content":"<p>This post has far too many categories.<\/p>\n","excerpt":"This post has far too many categories.","date":"2008-05-03 06:19:03","modified":"2008-05-03 06:19:03","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":4,"slug":"antiquarianism","title":"antiquarianism","description":"","parent":0,"post_count":1},{"id":5,"slug":"arrangement","title":"arrangement","description":"","parent":0,"post_count":1},{"id":6,"slug":"asmodeus","title":"asmodeus","description":"","parent":0,"post_count":1},{"id":7,"slug":"broder","title":"broder","description":"","parent":0,"post_count":1},{"id":8,"slug":"buying","title":"buying","description":"","parent":0,"post_count":1},{"id":12,"slug":"championship","title":"championship","description":"","parent":0,"post_count":1},{"id":13,"slug":"chastening","title":"chastening","description":"","parent":0,"post_count":1},{"id":14,"slug":"clerkship","title":"clerkship","description":"","parent":0,"post_count":1},{"id":15,"slug":"disinclination","title":"disinclination","description":"","parent":0,"post_count":1},{"id":16,"slug":"disinfection","title":"disinfection","description":"","parent":0,"post_count":1},{"id":17,"slug":"dispatch","title":"dispatch","description":"","parent":0,"post_count":1},{"id":18,"slug":"echappee","title":"echappee","description":"","parent":0,"post_count":1},{"id":19,"slug":"enphagy","title":"enphagy","description":"","parent":0,"post_count":1},{"id":20,"slug":"equipollent","title":"equipollent","description":"","parent":0,"post_count":1},{"id":21,"slug":"fatuity","title":"fatuity","description":"","parent":0,"post_count":1},{"id":24,"slug":"gaberlunzie","title":"gaberlunzie","description":"","parent":0,"post_count":1},{"id":25,"slug":"illtempered","title":"illtempered","description":"","parent":0,"post_count":1},{"id":26,"slug":"insubordination","title":"insubordination","description":"","parent":0,"post_count":1},{"id":27,"slug":"lender","title":"lender","description":"","parent":0,"post_count":1},{"id":28,"slug":"monosyllable","title":"monosyllable","description":"","parent":0,"post_count":1},{"id":29,"slug":"packthread","title":"packthread","description":"","parent":0,"post_count":1},{"id":30,"slug":"palter","title":"palter","description":"","parent":0,"post_count":1},{"id":31,"slug":"papilionaceous","title":"papilionaceous","description":"","parent":0,"post_count":1},{"id":33,"slug":"personable","title":"personable","description":"","parent":0,"post_count":1},{"id":34,"slug":"propylaeum","title":"propylaeum","description":"","parent":0,"post_count":1},{"id":35,"slug":"pustule","title":"pustule","description":"","parent":0,"post_count":1},{"id":36,"slug":"quartern","title":"quartern","description":"","parent":0,"post_count":1},{"id":37,"slug":"scholarship","title":"scholarship","description":"","parent":0,"post_count":1},{"id":38,"slug":"selfconvicted","title":"selfconvicted","description":"","parent":0,"post_count":1},{"id":39,"slug":"showshoe","title":"showshoe","description":"","parent":0,"post_count":1},{"id":40,"slug":"sloyd","title":"sloyd","description":"","parent":0,"post_count":1},{"id":42,"slug":"sublunary","title":"sublunary","description":"","parent":0,"post_count":1},{"id":43,"slug":"tamtam","title":"tamtam","description":"","parent":0,"post_count":1},{"id":44,"slug":"weakhearted","title":"weakhearted","description":"","parent":0,"post_count":1},{"id":45,"slug":"ween","title":"ween","description":"","parent":0,"post_count":1},{"id":46,"slug":"wellhead","title":"wellhead","description":"","parent":0,"post_count":1},{"id":47,"slug":"wellintentioned","title":"wellintentioned","description":"","parent":0,"post_count":1},{"id":48,"slug":"whetstone","title":"whetstone","description":"","parent":0,"post_count":1},{"id":49,"slug":"years","title":"years","description":"","parent":0,"post_count":1}],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":167,"type":"post","slug":"many-tags","url":"http:\/\/wordpress.test\/2008\/05\/02\/many-tags\/","status":"publish","title":"Many Tags","title_plain":"Many Tags","content":"<p>This post has far too many tags.<\/p>\n","excerpt":"This post has far too many tags.","date":"2008-05-02 06:09:34","modified":"2008-05-02 06:09:34","categories":[],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":54,"slug":"cienaga","title":"cienaga","description":"","post_count":1},{"id":55,"slug":"claycold","title":"claycold","description":"","post_count":1},{"id":56,"slug":"crushing","title":"crushing","description":"","post_count":1},{"id":58,"slug":"dinarchy","title":"dinarchy","description":"","post_count":1},{"id":59,"slug":"doolie","title":"doolie","description":"","post_count":1},{"id":60,"slug":"energumen","title":"energumen","description":"","post_count":1},{"id":61,"slug":"ephialtes","title":"ephialtes","description":"","post_count":1},{"id":62,"slug":"eudiometer","title":"eudiometer","description":"","post_count":1},{"id":63,"slug":"figuriste","title":"figuriste","description":"","post_count":1},{"id":66,"slug":"habergeon","title":"habergeon","description":"","post_count":1},{"id":67,"slug":"hapless","title":"hapless","description":"","post_count":1},{"id":68,"slug":"hartshorn","title":"hartshorn","description":"","post_count":1},{"id":69,"slug":"hostility-impregnability","title":"hostility impregnability","description":"","post_count":1},{"id":70,"slug":"impropriation","title":"impropriation","description":"","post_count":1},{"id":72,"slug":"knave","title":"knave","description":"","post_count":1},{"id":73,"slug":"misinformed","title":"misinformed","description":"","post_count":1},{"id":74,"slug":"moil","title":"moil","description":"","post_count":1},{"id":75,"slug":"mornful","title":"mornful","description":"","post_count":1},{"id":76,"slug":"outlaw","title":"outlaw","description":"","post_count":1},{"id":77,"slug":"pamphjlet","title":"pamphjlet","description":"","post_count":1},{"id":78,"slug":"pneumatics","title":"pneumatics","description":"","post_count":1},{"id":79,"slug":"portly-portreeve","title":"portly portreeve","description":"","post_count":1},{"id":81,"slug":"precipitancy","title":"precipitancy","description":"","post_count":1},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2},{"id":83,"slug":"programme","title":"programme","description":"","post_count":1},{"id":84,"slug":"psychological","title":"psychological","description":"","post_count":1},{"id":85,"slug":"puncher","title":"puncher","description":"","post_count":1},{"id":86,"slug":"ramose","title":"ramose","description":"","post_count":1},{"id":87,"slug":"renegade","title":"renegade","description":"","post_count":1},{"id":88,"slug":"retrocede","title":"retrocede","description":"","post_count":1},{"id":89,"slug":"stagnation-unhorsed","title":"stagnation unhorsed","description":"","post_count":1},{"id":98,"slug":"thunderheaded","title":"thunderheaded","description":"","post_count":1},{"id":99,"slug":"unculpable","title":"unculpable","description":"","post_count":1},{"id":100,"slug":"withered-brandnew","title":"withered brandnew","description":"","post_count":1},{"id":101,"slug":"xanthopsia","title":"xanthopsia","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":131,"type":"post","slug":"test-with-secret-password","url":"http:\/\/wordpress.test\/2008\/04\/04\/test-with-secret-password\/","status":"publish","title":"Protected: Test with secret password","title_plain":"Protected: Test with secret password","content":"<form action=\"http:\/\/wordpress.test\/wp-pass.php\" method=\"post\">\n<p>This post is password protected. To view it please enter your password below:<\/p>\n<p><label for=\"pwbox-131\">Password:<br \/>\n<input name=\"post_password\" id=\"pwbox-131\" type=\"password\" size=\"20\" \/><\/label><br \/>\n<input type=\"submit\" name=\"Submit\" value=\"Submit\" \/><\/p><\/form>\n","excerpt":"There is no excerpt because this is a protected post.","date":"2008-04-04 09:38:05","modified":"2008-04-04 09:38:05","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":149,"type":"post","slug":"comment-test","url":"http:\/\/wordpress.test\/2008\/03\/03\/comment-test\/","status":"publish","title":"Comment Test","title_plain":"Comment Test","content":"<p>Here&#8217;s a post with some comments.<\/p>\n","excerpt":"Here&#8217;s a post with some comments.","date":"2008-03-03 10:11:37","modified":"2008-03-03 10:11:37","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[{"id":13,"name":"Test Author","url":"","date":"2007-09-03 10:18:04","content":"<p>Author comment.<\/p>\n<h1>Header one<\/h1>\n<h2>Header two<\/h2>\n<h3>Header three<\/h3>\n<h4>Header four<\/h4>\n<h5>Header five<\/h5>\n<h6>Header six<\/h6>\n<h2>Blockquote Tests<\/h2>\n<p>Blockquote:<\/p>\n<blockquote><p>Here&#8217;s a one line quote.<\/p><\/blockquote>\n<p>This part isn&#8217;t quoted. Here&#8217;s a longer quote:<\/p>\n<blockquote><p>It\u2019s like a language. You learn the alphabet, which are the scales. You learn sentences, which are the chords. And then you talk extemporaneously with the horn. It\u2019s a wonderful thing to speak extemporaneously, which is something I\u2019ve never gotten the hang of. But musically I love to talk just off the top of my head. And that\u2019s what jazz music is all about.<\/p>\n<p><cite>Stan Getz<\/cite><\/p><\/blockquote>\n<p>And some trailing text.<\/p>\n<h2>Table Layout Test<\/h2>\n<table class=\"statsDay\">\n<tbody>\n<tr>\n<th>Title<\/th>\n<th class=\"views\">Views<\/th>\n<th><\/th>\n<\/tr>\n<tr class=\"alternate\">\n<td class=\"label\"><a href=\"http:\/\/wpthemetestdata.wordpress.com\/about\/\" rel=\"nofollow\">About Test User<\/a><\/td>\n<td class=\"views\">1<\/td>\n<td class=\"more\">More<\/td>\n<\/tr>\n<tr>\n<td class=\"label\"><a href=\"http:\/\/wpthemetestdata.wordpress.com\/\" rel=\"nofollow\">260<\/a><\/td>\n<td class=\"views\">1<\/td>\n<td class=\"more\">More<\/td>\n<\/tr>\n<tr class=\"alternate\">\n<td class=\"label\"><a href=\"http:\/\/wpthemetestdata.wordpress.com\/archives\/\" rel=\"nofollow\">Archives<\/a><\/td>\n<td class=\"views\">1<\/td>\n<td class=\"more\">More<\/td>\n<\/tr>\n<tr>\n<td class=\"label\"><a href=\"http:\/\/wpthemetestdata.wordpress.com\/\" rel=\"nofollow\">235<\/a><\/td>\n<td class=\"views\">1<\/td>\n<td class=\"more\">More<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>List Type Tests<\/h2>\n<h3>Definition List<\/h3>\n<dl>\n<dt>Definition List Title<\/dt>\n<dd>This is a definition list division.<\/dd>\n<dt>Definition<\/dt>\n<dd>An exact statement or description of the nature, scope, or meaning of something: <em>our definition of what constitutes poetry.<\/em><\/dd>\n<dt>Gallery<\/dt>\n<dd>A feature introduced with WordPress 2.5, that is specifically an exposition of images attached to a post. In that same vein, an upload is &#8220;attached to a post&#8221; when you upload it while editing a post.<\/dd>\n<dt>Gravatar<\/dt>\n<dd>A globally recognized avatar (a graphic image or picture that represents a user). A gravatar is associated with an email address, and is maintained by the Gravatar.com service. Using this service, a blog owner can configure their blog so that a user&#8217;s gravatar is displayed along with their comments.<\/dd>\n<\/dl>\n<h3>Unordered List (Nested)<\/h3>\n<ul>\n<li>List item one\n<ul>\n<li>List item one\n<ul>\n<li>List item one<\/li>\n<li>List item two<\/li>\n<li>List item three<\/li>\n<li>List item four<\/li>\n<\/ul>\n<\/li>\n<li>List item two<\/li>\n<li>List item three<\/li>\n<li>List item four<\/li>\n<\/ul>\n<\/li>\n<li>List item two<\/li>\n<li>List item three<\/li>\n<li>List item four<\/li>\n<\/ul>\n<h3>Ordered List<\/h3>\n<ol>\n<li>List item one\n<ol>\n<li>List item one\n<ol>\n<li>List item one<\/li>\n<li>List item two<\/li>\n<li>List item three<\/li>\n<li>List item four<\/li>\n<\/ol>\n<\/li>\n<li>List item two<\/li>\n<li>List item three<\/li>\n<li>List item four<\/li>\n<\/ol>\n<\/li>\n<li>List item two<\/li>\n<li>List item three<\/li>\n<li>List item four<\/li>\n<\/ol>\n<h2>HTML Element Tag Tests<\/h2>\n<p>All other HTML tags listed in the <a href=\"http:\/\/en.support.wordpress.com\/code\/\" rel=\"nofollow\">FAQ<\/a>:<\/p>\n<p>Here is the address for Automattic, using the <code>&lt;address&gt;<\/code> tag:<\/p>\n<address>355 1st Street Suite 202<br \/>\nSan Francisco, CA 94105<br \/>\nUnited States<\/address>\n<p>This is an example of <a href=\"http:\/\/example.com\" rel=\"nofollow\">an <code>&lt;anchor&gt;<\/code><\/a> (otherwise known as a link). This <abbr title=\"abbreviation\">abbr.<\/abbr> is an example of an &lt;abbr&gt; tag in the middle of a sentence. Here is a <acronym title=\"three-letter acronym\">TLA<\/acronym> showing off the <code>&lt;acronym&gt;<\/code> tag. What, you want to see <big>some over-sized text<\/big> using the <code>&lt;big&gt;<\/code> tag? Can you <cite>cite a reference<\/cite> for that, using the <code>&lt;cite&gt;<\/code> tag? Have you noticed that all of the tag names are displayed <code>in code-form<\/code>, using the <code>&lt;code&gt;<\/code> tag? Similarly, I could <kbd>emulate keyboard text<\/kbd>, using the <code>&lt;kbd&gt;<\/code> text tag, or <tt>emulate teletype text<\/tt> using the <code>&lt;tt&gt;<\/code> tag.<\/p>\n<p>Oh no! I wrote something incorrectly. <del>I&#8217;d better delete it<\/del>, using the <code>&lt;del&gt;<\/code> tag. I could alternately <span style=\"text-decoration:line-through;\">strike something out<\/span> using the <code>&lt;strike&gt;<\/code> tag, or strike something out using the <code>&lt;s&gt;<\/code> tag. <em>So many choices<\/em>, which I emphasize using the <code>&lt;em&gt;<\/code> tag. Just to clarify, <ins>this is some inserted text<\/ins>, that I&#8217;ll highlight using the <code>&lt;ins&gt;<\/code> tag.<\/p>\n<p>Need to display completely unformatted text, such as a large block of code? Use the <code>&lt;pre&gt;<\/code> tag, which lets you display:<\/p>\n<pre>#container {\n\tfloat: left;\n\tmargin: 0 -240px 0 0;\n\twidth: 100%;\n}<\/pre>\n<p>Want to quote the WordPress tagline <q>Code is Poetry<\/q>? Use the <code>&lt;q&gt;<\/code> tag to add quotes around it. <strong>This is strong text<\/strong> (otherwise known as bold), using the <code>&lt;strong&gt;<\/code> tag.<\/p>\n<p>Need to write H<sub>2<\/sub>O or E = MC<sup>2<\/sup>? You may find great use for <sub>subscripting<\/sub> text using the <code>&lt;sub&gt;<\/code> tag, or for <sup>superscripting<\/sup> text using the <code>&lt;sup&gt;<\/code> tag. Need to call out a <var>variable<\/var>? Use the <code>&lt;var&gt;<\/code> tag.<\/p>\n<h2>Div and Span Tests<\/h2>\n<div>\n<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.<\/p>\n<div class=\"myclass\"><strong>This is a div with &#8220;myclass&#8221; class, inside of another div, using the <code>&lt;div&gt;<\/code> tag.<\/strong><\/div>\n<p>Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl.<\/p>\n<\/div>\n<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. <span><strong>This is a span inside of a paragraph, using the <code>&lt;span&gt;<\/code> tag.<\/strong><\/span> Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl.<\/p>\n","parent":0},{"id":10,"name":"Alex Shiels","url":"http:\/\/flightpath.wordpress.com\/","date":"2007-09-04 10:12:13","content":"<p>Not an author comment.<\/p>\n","parent":0},{"id":11,"name":"Anon","url":"","date":"2007-09-04 10:14:19","content":"<p>I&#8217;m not logged in.<\/p>\n<blockquote><p>\nContrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered<\/p>\n<blockquote><p>\nContrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered<\/p>\n<blockquote><p>\nContrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered<\/p>\n<\/blockquote>\n<\/blockquote>\n<\/blockquote>\n","parent":0},{"id":12,"name":"Matt","url":"http:\/\/photomatt.net\/","date":"2007-09-04 10:15:32","content":"<p>Anonymous person pretending to be Matt.<\/p>\n","parent":0},{"id":14,"name":"Lloyd Budd","url":"http:\/\/foolswisdom.com","date":"2007-09-04 10:23:10","content":"<p>Another test<\/p>\n","parent":0},{"id":15,"name":"tellyworthtest1","url":"","date":"2007-09-04 10:35:33","content":"<p>I&#8217;m logged in but I don&#8217;t have a blog.<\/p>\n","parent":0},{"id":16,"name":"tellyworthtest2","url":"","date":"2007-09-04 10:45:21","content":"<p>I&#8217;m a contributor to this blog.<\/p>\n","parent":0},{"id":18,"name":"Alex Shiels","url":"http:\/\/flightpath.wordpress.com\/","date":"2007-09-04 13:26:26","content":"<p>Here&#8217;s a comment with a <a href=\"http:\/\/example.com\/\" rel=\"nofollow\">link<\/a>.<\/p>\n","parent":0},{"id":19,"name":"mdawaffe","url":"http:\/\/blogwaffe.com","date":"2007-09-04 16:51:33","content":"<p>what am I testing<\/p>\n","parent":0},{"id":21,"name":"Joseph Scott","url":"http:\/\/joseph.randomnetworks.com\/","date":"2007-12-08 07:24:25","content":"<p>Hi There!<\/p>\n","parent":0},{"id":22,"name":"tellyworthtest","url":"","date":"2010-07-01 17:24:23","content":"<p>Test Threaded Comment &#8211; nested one deep.<\/p>\n","parent":10},{"id":23,"name":"tellyworthtest","url":"","date":"2010-07-01 17:26:11","content":"<p>Test threaded comment &#8211; one level deep (take two).<\/p>\n","parent":11},{"id":24,"name":"tellyworthtest1","url":"","date":"2010-07-01 17:31:56","content":"<p>Testing threaded comments &#8211; two levels deep.<\/p>\n","parent":23},{"id":25,"name":"Test Author","url":"","date":"2010-07-01 17:51:11","content":"<p>Another author comment<\/p>\n","parent":0},{"id":26,"name":"Test Author","url":"","date":"2010-07-01 17:56:59","content":"<p>Testing an author reply comment<\/p>\n","parent":11},{"id":27,"name":"tellyworthtest2","url":"","date":"2010-07-01 17:57:36","content":"<p>Replying to an author reply comment.<\/p>\n","parent":26},{"id":28,"name":"Test Contributor","url":"","date":"2010-07-01 18:02:10","content":"<p>Contributor comment<\/p>\n","parent":0},{"id":29,"name":"admin","url":"","date":"2010-07-01 18:05:32","content":"<p>Administrator comment reply.<\/p>\n","parent":24}],"attachments":[],"comment_count":20,"comment_status":"open"}]}
 
 
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_recent_posts&page=2');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $post = $response->posts[0];
12
+
13
+ echo "Response status: $response->status\n";
14
+ echo "Post count: $response->count\n";
15
+ echo "Post title: $post->title\n";
16
 
17
  ?>
18
  --EXPECT--
19
+ Response status: ok
20
+ Post count: 10
21
+ Post title: Template: Paginated
tests/core.get_search_posts-01.phpt CHANGED
@@ -5,10 +5,17 @@ core.get_search_posts default
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
- $http->get('http://wordpress.test/?json=core.get_search_posts&search=wordpress');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
 
11
 
12
  ?>
13
  --EXPECT--
14
- {"status":"ok","count":10,"count_total":22,"pages":3,"posts":[{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, &#8220;Oh, why can&#8217;t you remain like this for ever!&#8221; This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"right-align-no-caption\">Right-align, no caption<\/h3>\n<p>Right-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignright size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"no-alignment-no-caption\">No alignment, no caption<\/h3>\n<p>None-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignnone size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n","excerpt":"Image Alignment Tests: Un-Captioned Images Center-align, no caption Center-aligned image with no caption, and text before and after. ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae &hellip; <a href=\"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-09-03 09:35:23","modified":"2008-09-03 09:35:23","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":534,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","slug":"test-image-landscape-900","title":"test-image-landscape-900","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":900,"height":598},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":640,"height":425},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape-9001.jpg","width":297,"height":198}}},{"id":535,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","slug":"test-image-landscape","title":"test-image-landscape","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":300,"height":199},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg","width":298,"height":198}}},{"id":536,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","slug":"test-image-portrait","title":"test-image-portrait","description":"","caption":"","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":99,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":199,"height":300},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-portrait1.jpg","width":131,"height":198}}},{"id":543,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","slug":"spectacles","title":"spectacles","description":"","caption":"","parent":128,"mime_type":"image\/gif","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":117,"height":150},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":165,"height":210},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/spectacles1.gif","width":155,"height":198}}},{"id":544,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","slug":"boat","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":128,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":555,"type":"post","slug":"post-format-test-gallery","url":"http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/","status":"publish","title":"Post Format Test: Gallery","title_plain":"Post Format Test: Gallery","content":"\n\t\t<div id='gallery-1' class='gallery galleryid-555 gallery-columns-3 gallery-size-thumbnail'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/canola2\/' title='canola2'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg\" class=\"attachment-thumbnail\" alt=\"canola\" title=\"canola2\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20040724_152504_532\/' title='dsc20040724_152504_532'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\" class=\"attachment-thumbnail\" alt=\"chunk of resinous blackboy husk\" title=\"dsc20040724_152504_532\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption'>\n\t\t\t\tChunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.\n\t\t\t\t<\/dd><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050315_145007_132\/' title='dsc20050315_145007_132'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050315_145007_132\" title=\"dsc20050315_145007_132\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050604_133440_3421\/' title='dsc20050604_133440_3421'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050604_133440_3421\" title=\"dsc20050604_133440_3421\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050727_091048_222\/' title='dsc20050727_091048_222'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050727_091048_222\" title=\"dsc20050727_091048_222\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050813_115856_52\/' title='dsc20050813_115856_52'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050813_115856_52\" title=\"dsc20050813_115856_52\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050831_165238_332\/' title='dsc20050831_165238_332'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050831_165238_332\" title=\"dsc20050831_165238_332\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050901_105100_212\/' title='dsc20050901_105100_212'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg\" class=\"attachment-thumbnail\" alt=\"Seed pods on stem, Woodvale\" title=\"dsc20050901_105100_212\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption'>\n\t\t\t\tSeed pods on stem, Woodvale\n\t\t\t\t<\/dd><\/dl>\n\t\t\t<br style='clear: both;' \/>\n\t\t<\/div>\n\n","excerpt":"","date":"2008-06-10 07:24:14","modified":"2008-06-10 07:24:14","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":611,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","slug":"canola2","title":"canola2","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","width":264,"height":198}}},{"id":612,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","slug":"dsc20040724_152504_532","title":"dsc20040724_152504_532","description":"","caption":"Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg","width":264,"height":198}}},{"id":613,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","slug":"dsc20050315_145007_132","title":"dsc20050315_145007_132","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg","width":264,"height":198}}},{"id":615,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","slug":"dsc20050604_133440_3421","title":"dsc20050604_133440_3421","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg","width":264,"height":198}}},{"id":616,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","slug":"dsc20050727_091048_222","title":"dsc20050727_091048_222","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg","width":264,"height":198}}},{"id":617,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","slug":"dsc20050813_115856_52","title":"dsc20050813_115856_52","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg","width":264,"height":198}}},{"id":618,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","slug":"dsc20050831_165238_332","title":"dsc20050831_165238_332","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg","width":264,"height":198}}},{"id":619,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","slug":"dsc20050901_105100_212","title":"dsc20050901_105100_212","description":"","caption":"Seed pods on stem, Woodvale","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":150,"height":112},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":300,"height":225},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":640,"height":480},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg","width":264,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":559,"type":"post","slug":"post-format-test-aside","url":"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/","status":"publish","title":"Post Format Test: Aside","title_plain":"Post Format Test: Aside","content":"<p>\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it&#8217;s always come first, but the music ain&#8217;t worth nothing if you can&#8217;t lay it on the public. The main thing is to live for that audience, &#8217;cause what you&#8217;re there for is to please the people.\u201d<\/p>\n","excerpt":"\u201cI never tried to prove nothing, just wanted to give a good show. My life has always been my music, it&#8217;s always come first, but the music ain&#8217;t worth nothing if you can&#8217;t lay it on the public. The main &hellip; <a href=\"http:\/\/wordpress.test\/2008\/06\/09\/post-format-test-aside\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a>","date":"2008-06-09 07:51:54","modified":"2008-06-09 07:51:54","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":562,"type":"post","slug":"post-format-test-chat","url":"http:\/\/wordpress.test\/2008\/06\/08\/post-format-test-chat\/","status":"publish","title":"Post Format Test: Chat","title_plain":"Post Format Test: Chat","content":"<p>John: foo<br \/>\nMary: bar<br \/>\nJohn: foo 2<\/p>\n","excerpt":"John: foo Mary: bar John: foo 2","date":"2008-06-08 07:59:31","modified":"2008-06-08 07:59:31","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":565,"type":"post","slug":"post-format-test-link","url":"http:\/\/wordpress.test\/2008\/06\/07\/post-format-test-link\/","status":"publish","title":"Post Format Test: Link","title_plain":"Post Format Test: Link","content":"<p><a href=\"http:\/\/make.wordpress.org\/themes\" title=\"The WordPress Theme Review Team Website\">The WordPress Theme Review Team Website<\/a><\/p>\n","excerpt":"The WordPress Theme Review Team Website","date":"2008-06-07 08:06:53","modified":"2008-06-07 08:06:53","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":674,"type":"post","slug":"post-format-test-image-attached","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-attached\/","status":"publish","title":"Post Format Test: Image (Attached)","title_plain":"Post Format Test: Image (Attached)","content":"<div id=\"attachment_675\" class=\"wp-caption aligncenter\" style=\"width: 445px\"><a href=\"http:\/\/wpthemetestdata.wordpress.com\/2008\/06\/06\/post-format-test-image-attached\/boat-2\/\" rel=\"attachment wp-att-675\"><img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg\" alt=\"boat\" title=\"boat\" width=\"435\" height=\"288\" class=\"size-full wp-image-675\" \/><\/a><p class=\"wp-caption-text\">A picture is worth a thousand words<\/p><\/div>\n","excerpt":"","date":"2008-06-06 09:42:19","modified":"2008-06-06 09:42:19","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":675,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","slug":"boat-2","title":"boat","description":"","caption":"A picture is worth a thousand words","parent":674,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":150,"height":99},"medium":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":300,"height":198},"large":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":435,"height":288},"post-thumbnail":{"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/boat1.jpg","width":299,"height":198}}}],"comment_count":0,"comment_status":"closed"},{"id":568,"type":"post","slug":"post-format-test-image-linked","url":"http:\/\/wordpress.test\/2008\/06\/06\/post-format-test-image-linked\/","status":"publish","title":"Post Format Test: Image (Linked)","title_plain":"Post Format Test: Image (Linked)","content":"<div id=\"attachment_612\" class=\"wp-caption aligncenter\" style=\"width: 650px\"><a href=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\"><img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\" alt=\"chunk of resinous blackboy husk\" title=\"dsc20040724_152504_532\" width=\"640\" height=\"480\" class=\"size-full wp-image-612\" \/><\/a><p class=\"wp-caption-text\">Chunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.<\/p><\/div>\n","excerpt":"","date":"2008-06-06 08:09:39","modified":"2008-06-06 08:09:39","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":575,"type":"post","slug":"post-format-test-quote","url":"http:\/\/wordpress.test\/2008\/06\/05\/post-format-test-quote\/","status":"publish","title":"Post Format Test: Quote","title_plain":"Post Format Test: Quote","content":"<blockquote><p>Only one thing is impossible for God: To find any sense in any copyright law on the planet.<br \/>\n<cite><a href=\"http:\/\/www.brainyquote.com\/quotes\/quotes\/m\/marktwain163473.html\">Mark Twain<\/a><\/cite><\/p><\/blockquote>\n","excerpt":"Only one thing is impossible for God: To find any sense in any copyright law on the planet. Mark Twain","date":"2008-06-05 08:13:15","modified":"2008-06-05 08:13:15","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]}
 
 
5
 
6
  require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
+ $http->get('http://wordpress.test/?json=core.get_search_results&search=foolish');
9
  $response = $http->currentResponse();
10
+ $response = json_decode($response['body']);
11
+ $post = $response->posts[0];
12
+
13
+ echo "Response status: $response->status\n";
14
+ echo "Post count: $response->count\n";
15
+ echo "Post title: $post->title\n";
16
 
17
  ?>
18
  --EXPECT--
19
+ Response status: ok
20
+ Post count: 2
21
+ Post title: Page Markup And Formatting
tests/core.get_tag_index-01.phpt CHANGED
@@ -7,8 +7,797 @@ require_once 'HTTP/Client.php';
7
  $http = new HTTP_Client();
8
  $http->get('http://wordpress.test/?json=core.get_tag_index');
9
  $response = $http->currentResponse();
10
- echo $response['body'];
 
 
 
 
 
11