|
|
@@ -26,7 +26,11 @@ function default_post_format( $item, $include_content ) {
|
|
26
|
26
|
$thumbnailId = get_post_meta( $item->ID, '_thumbnail_id', true );
|
|
27
|
27
|
$filtered[featured] = get_post($thumbnailId)->guid;
|
|
28
|
28
|
}
|
|
29
|
|
-
|
|
|
29
|
+ $filtered[thumb] = get_the_post_thumbnail_url($item, 'medium');
|
|
|
30
|
+ if(!$filtered[thumb]) {
|
|
|
31
|
+ $thumbnailId = get_post_meta( $item->ID, '_thumbnail_id', true );
|
|
|
32
|
+ $filtered[thumb] = get_post($thumbnailId)->guid;
|
|
|
33
|
+ }
|
|
30
|
34
|
// Materials + type endpoints
|
|
31
|
35
|
// if($item->post_type === 'artist' || $item->post_type === 'event' || $item->post_type === 'exhibition') {
|
|
32
|
36
|
$posts_with_type = ['artist', 'exhbition', 'event'];
|
|
|
@@ -36,7 +40,7 @@ function default_post_format( $item, $include_content ) {
|
|
36
|
40
|
}
|
|
37
|
41
|
|
|
38
|
42
|
// Custom fields endpoint
|
|
39
|
|
- if($item->post_type === 'episode') $filtered[credits] = get_post_meta( $item->ID, 'credits', true );
|
|
|
43
|
+ if($item->post_type === 'episode' && $include_content) $filtered[credits] = get_post_meta( $item->ID, 'credits', true );
|
|
40
|
44
|
|
|
41
|
45
|
if($item->post_type === 'artist') $filtered[sortname] = get_post_meta( $item->ID, 'artist-sort-name', true );
|
|
42
|
46
|
|