Display command to rerun

This commit is contained in:
Will Boyd
2020-01-12 13:50:50 -05:00
parent 62459a654e
commit c428cd574c
3 changed files with 45 additions and 19 deletions
+8 -5
View File
@@ -60,17 +60,20 @@ function getPostId(post) {
return post.post_id[0];
}
function getPostSlug(post) {
return post.post_name[0];
}
function getPostCoverImageId(post) {
if (post.postmeta === undefined) return;
if (post.postmeta === undefined) {
return undefined;
}
let postmeta = post.postmeta.find(postmeta => postmeta.meta_key[0] === '_thumbnail_id');
let id = postmeta ? postmeta.meta_value[0] : undefined;
return id;
}
function getPostSlug(post) {
return post.post_name[0];
}
function getPostTitle(post) {
return post.title[0];
}