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