Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the Person piece only for publishers. #20827

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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