Adds return of different sizes of thumbnails
This commit is contained in:
parent
c410b3cfa8
commit
14c67619b3
|
@ -206,10 +206,16 @@ class Collection extends Entity {
|
|||
}
|
||||
|
||||
/**
|
||||
* @return false|string
|
||||
* @return array
|
||||
*/
|
||||
function get_thumbnail() {
|
||||
return get_the_post_thumbnail_url( $this->get_id(), 'full' );
|
||||
return array(
|
||||
'thumb' => get_the_post_thumbnail_url( $this->get_id(), 'post-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' ),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -126,10 +126,16 @@ class Item extends Entity {
|
|||
}
|
||||
|
||||
/**
|
||||
* @return false|string
|
||||
* @return array
|
||||
*/
|
||||
function get_thumbnail() {
|
||||
return get_the_post_thumbnail_url( $this->get_id(), 'full' );
|
||||
return array(
|
||||
'thumb' => get_the_post_thumbnail_url( $this->get_id(), 'post-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' ),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue