/** * constructor * * @uses WiziappLayoutComponent::init() * * @param string $layout the layout name * @param array $data the data the components relays on * @return WiziappImagesAlbumCellItem */ function WiziappImagesAlbumCellItem($layout = 'L1', $data) { if (count($data[0]['images']) < 2) { return FALSE; } parent::init($layout, $data); }
/** * before the wiziappLayoutComponent::process() will kick in, we need to * do a bit of processing ourselfs to get the image information. * This component knows how to handle wordpress attachments and predefined * images objects that follows wiziappImage structure * * @see wiziappImage * @uses wiziappLayoutComponent::process(); */ function process() { if (isset($this->data[1]) && $this->data[1]) { // We got the image from a plugin, it follows our api.... $this->image = (object) $this->data[0]; } else { // We got the image from wordpress gallery, fit it to our API $attachment_id = $this->data[0]->ID; $image = wp_get_attachment_image_src($attachment_id, 'wiziapp-iphone'); $thumb = wp_get_attachment_image_src($attachment_id, 'wiziapp-thumbnail'); $imageDetails = get_post($attachment_id); $caption = $imageDetails->post_excerpt; if (empty($caption)) { $caption = str_replace('&', '&', $imageDetails->post_title); } $this->image = new wiziappImage($thumb[0], $image[0], $imageDetails->post_content, $attachment_id, $imageDetails->post_parent, $caption); } parent::process(); }
/** * constructor * * @uses WiziappLayoutComponent::init() * * @param string $layout the layout name * @param array $data the data the components relays on * @return WiziappLinkCellItem */ function WiziappLinkCellItem($layout = 'L1', $data) { parent::init($layout, $data); }
/** * before the wiziappLayoutComponent::process() will kick in, we need to * do a bit of processing ourselfs to get the post information from wordpress. * * @uses wiziappLayoutComponent::process(); */ function process() { $this->post = get_post($this->data[0]); parent::process(); }
/** * constructor * * @uses WiziappLayoutComponent::init() * * @param string $layout the layout name * @param array $data the data the components relays on * @return WiziappAudioCellItem */ function WiziappVideoGalleryCellItem($layout = 'L1', $data) { parent::init($layout, $data); }
/** * constructor * * @uses WiziappLayoutComponent::init() * * @param string $layout the layout name * @param array $data the data the components relays on * @return WiziappVideosAlbumCellItem */ function WiziappVideosAlbumCellItem($layout = 'L2', $data) { parent::init($layout, $data); }
/** * constructor * * @uses WiziappLayoutComponent::init() * * @param string $layout the layout name * @param array $data the data the components relays on * @return WiziappCategoryCellItem */ function WiziappScrollingCategoryCellItem($layout = 'L1', $data) { parent::init($layout, $data); }
/** * constructor * * @uses WiziappLayoutComponent::init() * * @param string $layout the layout name * @param array $data the data the components relays on * @return WiziappArchiveSummeryCellItem */ function WiziappArchiveSummeryCellItem($layout = 'L1', $data) { parent::init($layout, $data); }