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