Initial commit

This commit is contained in:
Dan Phiffer committed 2011-03-25 12:22:44 -04:00
commit 86c1e5f82b
40 files changed
+4362

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
<?php
class JSON_API_Category {
var $id; // Integer
var $slug; // String
var $title; // String
var $description; // String
var $parent; // Integer
var $post_count; // Integer
function JSON_API_Category($wp_category = null) {
if ($wp_category) {
$this->import_wp_object($wp_category);
}
}
function import_wp_object($wp_category) {
$this->id = (int) $wp_category->term_id;
$this->slug = $wp_category->slug;
$this->title = $wp_category->name;
$this->description = $wp_category->description;
$this->parent = (int) $wp_category->parent;
$this->post_count = (int) $wp_category->count;
}
}
?>