Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings #191

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/json-api/models/attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/json-api/models/author.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion plugins/json-api/models/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/json-api/models/comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/json-api/models/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,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);
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/json-api/models/tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down