Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Oct 25, 2024
1 parent f0d2425 commit 5d50bac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/core-data/src/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,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

0 comments on commit 5d50bac

Please sign in to comment.