Skip to content

Commit

Permalink
Deprecate canUserEditEntityRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Jul 11, 2024
1 parent 5ff9407 commit df1dbd2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/core-data/src/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,11 @@ export function canUserEditEntityRecord(
name: string,
recordId: EntityRecordKey
): boolean | undefined {
deprecated( `wp.data.select( 'core' ).canUserEditEntityRecord()`, {
since: '6.7',
alternative: `wp.data.select( 'core' ).canUser( 'update', { kind, name, id } )`,
} );

return canUser( state, 'update', { kind, name, id: recordId } );
}

Expand Down

0 comments on commit df1dbd2

Please sign in to comment.