Now API serves the Tainacan thumbnail sizes

This commit is contained in:
weryques 2018-08-21 08:47:54 -03:00
parent 9f6c111f83
commit f64fe8f4d6
2 changed files with 16 additions and 10 deletions

View File

@ -214,11 +214,14 @@ class Collection extends Entity {
*/ */
function get_thumbnail() { function get_thumbnail() {
return array( return array(
'thumb' => get_the_post_thumbnail_url( $this->get_id(), 'thumbnail' ), 'thumb' => get_the_post_thumbnail_url( $this->get_id(), 'thumbnail' ),
'full' => get_the_post_thumbnail_url( $this->get_id(), 'full' ), 'full' => get_the_post_thumbnail_url( $this->get_id(), 'full' ),
'medium' => get_the_post_thumbnail_url( $this->get_id(), 'medium' ), 'medium' => get_the_post_thumbnail_url( $this->get_id(), 'medium' ),
'medium_large' => get_the_post_thumbnail_url( $this->get_id(), 'medium_large' ), 'medium_large' => get_the_post_thumbnail_url( $this->get_id(), 'medium_large' ),
'large' => get_the_post_thumbnail_url( $this->get_id(), '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' ),
); );
} }

View File

@ -130,11 +130,14 @@ class Item extends Entity {
*/ */
function get_thumbnail() { function get_thumbnail() {
return array( return array(
'thumb' => get_the_post_thumbnail_url( $this->get_id(), 'thumbnail' ), 'thumb' => get_the_post_thumbnail_url( $this->get_id(), 'thumbnail' ),
'full' => get_the_post_thumbnail_url( $this->get_id(), 'full' ), 'full' => get_the_post_thumbnail_url( $this->get_id(), 'full' ),
'medium' => get_the_post_thumbnail_url( $this->get_id(), 'medium' ), 'medium' => get_the_post_thumbnail_url( $this->get_id(), 'medium' ),
'medium_large' => get_the_post_thumbnail_url( $this->get_id(), 'medium_large' ), 'medium_large' => get_the_post_thumbnail_url( $this->get_id(), 'medium_large' ),
'large' => get_the_post_thumbnail_url( $this->get_id(), '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' ),
); );
} }