Skip to content

Commit

Permalink
Merge pull request #20827 from Yoast/mixed-schema-output-when-both-co…
Browse files Browse the repository at this point in the history
…mpany-and-person-information-is-stored-in-database
  • Loading branch information
thijsoo authored Nov 8, 2023
2 parents 72f8c3d + 04e5b86 commit 3ffcdba
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion src/generators/schema/person.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function is_needed() {
return false;
}

return $this->context->site_represents === 'person' || $this->context->indexable->object_type === 'user';
return $this->context->site_represents === 'person';
}

/**
Expand Down
14 changes: 0 additions & 14 deletions tests/unit/generators/schema/person-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,20 +393,6 @@ public function test_is_shown_when_site_represents_person() {
$this->assertTrue( $this->instance->is_needed( $this->instance->context ) );
}

/**
* Tests whether the person Schema piece is shown on author archive pages.
*
* @covers ::is_needed
* @covers ::site_represents_current_author
*/
public function test_is_shown_on_author_archive_pages() {
$this->instance->context->indexable = (object) [
'object_type' => 'user',
];

$this->assertTrue( $this->instance->is_needed( $this->instance->context ) );
}

/**
* Tests is not needed when the site represents an organization.
*
Expand Down

0 comments on commit 3ffcdba

Please sign in to comment.