Skip to content
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
1 change: 1 addition & 0 deletions backport-changelog/7.0/10894.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ https://github.com/WordPress/wordpress-develop/pull/10894
* https://github.com/WordPress/gutenberg/pull/75366
* https://github.com/WordPress/gutenberg/pull/75681
* https://github.com/WordPress/gutenberg/pull/75682
* https://github.com/WordPress/gutenberg/pull/75708
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@ private function can_user_sync_entity_type( string $entity_kind, string $entity_
return current_user_can( 'edit_post', absint( $object_id ) );
}

// Handle single taxonomy term entities with a defined object ID.
if ( 'taxonomy' === $entity_kind && is_numeric( $object_id ) ) {
$taxonomy = get_taxonomy( $entity_name );
return isset( $taxonomy->cap->assign_terms ) && current_user_can( $taxonomy->cap->assign_terms );
}

// All of the remaining checks are for collections. If an object ID is
// provided, reject the request.
if ( null !== $object_id ) {
Expand Down
Loading