Skip to content

Commit

Permalink
Copy update.
Browse files Browse the repository at this point in the history
Now that #55827 has landed we can start supporting individual global styles URLs as well.
  • Loading branch information
ramonjd committed Nov 23, 2023
1 parent 83f3838 commit 9f99392
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/core-data/src/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,10 @@ export const rootEntitiesConfig = [
baseURLParams: { context: 'edit' },
plural: 'globalStylesVariations', // Should be different than name.
getTitle: ( record ) => record?.title?.rendered || record?.title,
getRevisionsUrl: ( parentId ) =>
`/wp/v2/global-styles/${ parentId }/revisions`,
getRevisionsUrl: ( parentId, revisionId ) =>
`/wp/v2/global-styles/${ parentId }/revisions${
revisionId ? '/' + revisionId : ''
}`,
supports: {
revisions: true,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core-data/src/resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ export const getRevisions =
);

// When requesting all fields, the list of results can be used to
// resolve the `getEntityRecord` selector in addition to `getEntityRecords`.
// resolve the `getRevision` selector in addition to `getRevisions`.
if ( ! query?._fields && ! query.context ) {
const key = entityConfig.key || DEFAULT_ENTITY_KEY;
const resolutionsArgs = records
Expand Down

0 comments on commit 9f99392

Please sign in to comment.