From f64fe8f4d66692ddc932deb9b4ae415ca8b6dcfb Mon Sep 17 00:00:00 2001 From: weryques Date: Tue, 21 Aug 2018 08:47:54 -0300 Subject: [PATCH] Now API serves the Tainacan thumbnail sizes --- src/classes/entities/class-tainacan-collection.php | 13 ++++++++----- src/classes/entities/class-tainacan-item.php | 13 ++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/classes/entities/class-tainacan-collection.php b/src/classes/entities/class-tainacan-collection.php index 29aab0c22..47aa9bbec 100644 --- a/src/classes/entities/class-tainacan-collection.php +++ b/src/classes/entities/class-tainacan-collection.php @@ -214,11 +214,14 @@ class Collection extends Entity { */ function get_thumbnail() { return array( - 'thumb' => get_the_post_thumbnail_url( $this->get_id(), 'thumbnail' ), - 'full' => get_the_post_thumbnail_url( $this->get_id(), 'full' ), - 'medium' => get_the_post_thumbnail_url( $this->get_id(), 'medium' ), - 'medium_large' => get_the_post_thumbnail_url( $this->get_id(), 'medium_large' ), - 'large' => get_the_post_thumbnail_url( $this->get_id(), 'large' ), + 'thumb' => get_the_post_thumbnail_url( $this->get_id(), 'thumbnail' ), + 'full' => get_the_post_thumbnail_url( $this->get_id(), 'full' ), + 'medium' => get_the_post_thumbnail_url( $this->get_id(), 'medium' ), + 'medium_large' => get_the_post_thumbnail_url( $this->get_id(), 'medium_large' ), + 'large' => get_the_post_thumbnail_url( $this->get_id(), 'large' ), + 'tainacan_small' => get_the_post_thumbnail_url( $this->get_id(), 'tainacan-small' ), + 'tainacan_medium' => get_the_post_thumbnail_url( $this->get_id(), 'tainacan-medium' ), + 'tainacan_medium_full' => get_the_post_thumbnail_url( $this->get_id(), 'tainacan-medium-full' ), ); } diff --git a/src/classes/entities/class-tainacan-item.php b/src/classes/entities/class-tainacan-item.php index e90494c5e..387d46bdd 100644 --- a/src/classes/entities/class-tainacan-item.php +++ b/src/classes/entities/class-tainacan-item.php @@ -130,11 +130,14 @@ class Item extends Entity { */ function get_thumbnail() { return array( - 'thumb' => get_the_post_thumbnail_url( $this->get_id(), 'thumbnail' ), - 'full' => get_the_post_thumbnail_url( $this->get_id(), 'full' ), - 'medium' => get_the_post_thumbnail_url( $this->get_id(), 'medium' ), - 'medium_large' => get_the_post_thumbnail_url( $this->get_id(), 'medium_large' ), - 'large' => get_the_post_thumbnail_url( $this->get_id(), 'large' ), + 'thumb' => get_the_post_thumbnail_url( $this->get_id(), 'thumbnail' ), + 'full' => get_the_post_thumbnail_url( $this->get_id(), 'full' ), + 'medium' => get_the_post_thumbnail_url( $this->get_id(), 'medium' ), + 'medium_large' => get_the_post_thumbnail_url( $this->get_id(), 'medium_large' ), + 'large' => get_the_post_thumbnail_url( $this->get_id(), 'large' ), + 'tainacan_small' => get_the_post_thumbnail_url( $this->get_id(), 'tainacan-small' ), + 'tainacan_medium' => get_the_post_thumbnail_url( $this->get_id(), 'tainacan-medium' ), + 'tainacan_medium_full' => get_the_post_thumbnail_url( $this->get_id(), 'tainacan-medium-full' ), ); }