public function __construct($options) { if (!isset($options["taxonomy"])) { throw new \InvalidArgumentException("`taxonomy` options required."); } parent::__construct($options); }
protected function wpmvcAddData($item) { $item = parent::wpmvcAddData($item); $item->url = wp_get_attachment_url($item->ID); $item->alt_text = get_post_meta($item->ID, "_wp_attachment_image_alt", true); return $item; }
protected function prepareOptions($options) { if ($options["type"] == "attachment") { $options["status"] = "inherit"; } parent::prepareOptions($options); }
protected function wpmvcAddData($item) { $item = parent::wpmvcAddData($item); $item->url = get_permalink($item->ID); $item->attachments = $this->getAttachments($item); if ($this->hasFeatured()) { $item->featured_image = $this->getFeaturedImage($item); } $item->meta = $this->getMeta($item->ID); $item->author = $this->getAuthor($item); return $item; }
public function __construct($options) { parent::__construct($options); }