Skip to content

Commit 7251828

Browse files
committed
Return all data for category alongside post
1 parent fb8500f commit 7251828

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PostTypes/Post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function withExcerpt()
9898
public function withCategories()
9999
{
100100
$this->categories = \array_map(function (WP_Term $term) {
101-
return new Category($term->term_id);
101+
return (new Category($term->term_id))->withAll();
102102
}, \get_the_terms($this->WP_Post, 'category'));
103103

104104
return $this;

0 commit comments

Comments
 (0)