PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | src/repositories/primary-term-repository.php +5 -5 19.0 → trunk View file →
@@ -32,18 +32,18 @@
32 32 public function find_by_post_id_and_taxonomy( $post_id, $taxonomy, $auto_create = true ) {
33 33 /**
34 34 * Instance of the primary term.
35 35 *
36 - * @var Primary_Term $primary_term
36 + * @var Primary_Term $primary_term_indexable
37 37 */
38 - $primary_term = $this->query()
38 + $primary_term_indexable = $this->query()
39 39 ->where( 'post_id', $post_id )
40 40 ->where( 'taxonomy', $taxonomy )
41 41 ->find_one();
42 42
43 - if ( $auto_create && ! $primary_term ) {
44 - $primary_term = $this->query()->create();
43 + if ( $auto_create && ! $primary_term_indexable ) {
44 + $primary_term_indexable = $this->query()->create();
45 45 }
46 46
47 - return $primary_term;
47 + return $primary_term_indexable;
48 48 }
49 49 }