Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add comments
  • Loading branch information
ellatrix committed Oct 30, 2024
commit 3f4a31238971c7351d7178caec59b0a2164b0978
1 change: 1 addition & 0 deletions packages/core-data/src/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ async function loadSiteEntity() {
// Append a pseudo context value to allow preloading twice. `canUser`
// uses the same path. Ideally the raw result is cached and used by both
// `canUser` and `loadSiteEntity`.
// Please check the preloaded paths whenever this is changed.
path: entity.baseURL + '?context=schema',
method: 'OPTIONS',
} );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function useResolveEditedEntityAndContext( { postId, postType } ) {
frontPageTemplateId,
} = useSelect( ( select ) => {
const { getEntityRecord, getEntityRecords } = select( coreDataStore );
// Please check the preloaded paths whenever this is changed.
const siteData = getEntityRecord( 'root', 'site' );
const base = getEntityRecord( 'root', '__unstableBase' );
const templates = getEntityRecords( 'postType', TEMPLATE_POST_TYPE, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ function useBlockEditorSettings( settings, postType, postId, renderingMode ) {
const { getBlockTypes } = select( blocksStore );
const { getBlocksByName, getBlockAttributes } =
select( blockEditorStore );
// Please check the preloaded paths whenever this is changed.
const siteSettings = canUser( 'read', {
kind: 'root',
name: 'site',
Expand Down