This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
studentersamfundet.no/wp/wp-content/plugins/json-api/models/category.php
T
nikolark e903bd6114 Fixes tiled event display and JSON feed of events.
* New version of neuf-events
* New version of WP-JSON-API
* Renames event.event to event.event_type_parents in JSON-feed.
2014-01-11 20:15:56 +01:00

30 lines
686 B
PHP

<?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;
}
}
?>