From e54e6ad2575c2222021d611781fe3f906b43f918 Mon Sep 17 00:00:00 2001 From: Coby Tamayo Date: Mon, 15 Jul 2019 09:26:17 -0700 Subject: [PATCH] Use more specific posts_per_page param Update `Post::get_related_by_taxonomy()` from the more generic `numberposts` param to `posts_per_page` --- lib/Conifer/Post/Post.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Conifer/Post/Post.php b/lib/Conifer/Post/Post.php index 6269747..6e9a2c1 100644 --- a/lib/Conifer/Post/Post.php +++ b/lib/Conifer/Post/Post.php @@ -500,13 +500,13 @@ public function get_related_by_taxonomy( }, $this->terms($taxonomy)); $this->related_by[$taxonomy] = static::get_all([ - 'post_type' => $this->get_post_type(), - 'post__not_in' => [$this->ID], - 'numberposts' => $postCount, - 'tax_query' => [ + 'post_type' => $this->get_post_type(), + 'post__not_in' => [$this->ID], + 'posts_per_page' => $postCount, + 'tax_query' => [ [ - 'taxonomy' => $taxonomy, - 'terms' => $termIds, + 'taxonomy' => $taxonomy, + 'terms' => $termIds, ], ], ]);