diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..e376b0d Binary files /dev/null and b/.DS_Store differ diff --git a/models/attachment.php b/models/attachment.php index 1dd0c28..c244a1c 100644 --- a/models/attachment.php +++ b/models/attachment.php @@ -11,7 +11,7 @@ class JSON_API_Attachment { var $parent; // Integer var $mime_type; // String - function JSON_API_Attachment($wp_attachment = null) { + function __construct($wp_attachment = null) { if ($wp_attachment) { $this->import_wp_object($wp_attachment); if ($this->is_image()) { diff --git a/models/author.php b/models/author.php index ae399c1..54a9c1c 100644 --- a/models/author.php +++ b/models/author.php @@ -15,7 +15,7 @@ class JSON_API_Author { // JSON_API_Author objects can include additional values by using the // author_meta query var. - function JSON_API_Author($id = null) { + function __construct($id = null) { if ($id) { $this->id = (int) $id; } else { diff --git a/models/category.php b/models/category.php index 499373e..7bb50af 100644 --- a/models/category.php +++ b/models/category.php @@ -9,7 +9,7 @@ class JSON_API_Category { var $parent; // Integer var $post_count; // Integer - function JSON_API_Category($wp_category = null) { + function __construct($wp_category = null) { if ($wp_category) { $this->import_wp_object($wp_category); } diff --git a/models/comment.php b/models/comment.php index 8d93a6f..2ccc4f2 100644 --- a/models/comment.php +++ b/models/comment.php @@ -10,7 +10,7 @@ class JSON_API_Comment { var $parent; // Integer var $author; // Object (only if the user was registered & logged in) - function JSON_API_Comment($wp_comment = null) { + function __construct($wp_comment = null) { if ($wp_comment) { $this->import_wp_object($wp_comment); } diff --git a/models/post.php b/models/post.php index aa42762..b7dfd69 100644 --- a/models/post.php +++ b/models/post.php @@ -26,7 +26,7 @@ class JSON_API_Post { var $thumbnail; // String var $custom_fields; // Object (included by using custom_fields query var) - function JSON_API_Post($wp_post = null) { + function __construct($wp_post = null) { if (!empty($wp_post)) { $this->import_wp_object($wp_post); } diff --git a/models/tag.php b/models/tag.php index 48c3592..75adf6f 100644 --- a/models/tag.php +++ b/models/tag.php @@ -7,7 +7,7 @@ class JSON_API_Tag { var $title; // String var $description; // String - function JSON_API_Tag($wp_tag = null) { + function __construct($wp_tag = null) { if ($wp_tag) { $this->import_wp_object($wp_tag); }