Skip to content

Commit

Permalink
Disable the customization of theme.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Luehrsen committed Oct 13, 2024
1 parent 697bf6b commit 46c69b4
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions bin/updateThemeJsonSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,6 @@ request.get('https://schemas.wp.org/trunk/theme.json', (err, res, body) => {
*/
const themeJsonSchema = JSON.parse(body);

/**
* Modify the default theme schema to our needs.
*/
const palette =
themeJsonSchema.definitions.settingsPropertiesColor.properties.color
.properties.palette;

palette.items.properties = {
...palette.items.properties,
hover: {
description:
'CSS hex or rgba(a) string of a matching hover color.',
type: 'string',
},
contrast: {
description:
'CSS hex or rgba(a) string of a matching contrast color.',
type: 'string',
},
};

const fileContent = JSON.stringify(themeJsonSchema, null, 2);

fs.writeFile('./schemas/theme.json', fileContent, (error) => {
Expand Down

0 comments on commit 46c69b4

Please sign in to comment.