Example #1
0
 public function __construct($options)
 {
     if (!isset($options["taxonomy"])) {
         throw new \InvalidArgumentException("`taxonomy` options required.");
     }
     parent::__construct($options);
 }
Example #2
0
 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;
 }
Example #3
0
 protected function prepareOptions($options)
 {
     if ($options["type"] == "attachment") {
         $options["status"] = "inherit";
     }
     parent::prepareOptions($options);
 }
Example #4
0
 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;
 }
Example #5
0
 public function __construct($options)
 {
     parent::__construct($options);
 }