Skip to content

Commit

Permalink
Updated schemas for 6.7.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Nov 13, 2024
1 parent 837fe0c commit 2d33ed6
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 20 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"ergebnis/json-printer": "^3.5",
"johnbillion/args": "1.7.0",
"roots/wordpress-core-installer": "^1.0.0",
"roots/wordpress-full": "6.6",
"roots/wordpress-full": "6.7",
"wp-cli/core-command": "^2",
"wp-cli/db-command": "^2",
"wp-cli/language-command": "^2",
Expand Down
1 change: 1 addition & 0 deletions packages/wp-types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ export interface WP_Block_Template {
has_theme_file: boolean;
is_custom: boolean;
author: number | null;
plugin: string | null;
post_types: string[] | null;
area: string | null;
modified: string | null;
Expand Down
7 changes: 7 additions & 0 deletions schemas/block-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"has_theme_file",
"is_custom",
"author",
"plugin",
"post_types",
"modified",
"area"
Expand Down Expand Up @@ -75,6 +76,12 @@
"null"
]
},
"plugin": {
"type": [
"string",
"null"
]
},
"post_types": {
"type": [
"array",
Expand Down
26 changes: 11 additions & 15 deletions tests/external-schemas/font-collection.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"title": "JSON schema for WordPress Font Collections",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"fontFace": {
"description": "Font face settings, with added preview property.",
Expand All @@ -23,27 +22,27 @@
},
"fontWeight": {
"description": "List of available font weights, separated by a space.",
"default": "400",
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
],
"default": "400"
},
"fontDisplay": {
"description": "CSS font-display value.",
"type": "string",
"default": "fallback",
"enum": [
"auto",
"block",
"fallback",
"swap",
"optional"
]
],
"default": "fallback"
},
"src": {
"description": "Paths or URLs to the font files.",
Expand Down Expand Up @@ -104,14 +103,15 @@
"additionalProperties": false
}
},
"type": "object",
"properties": {
"$schema": {
"description": "JSON schema URI for font-collection.json.",
"type": "string"
},
"font_families": {
"type": "array",
"description": "Array of font families ready to be installed.",
"type": "array",
"items": {
"type": "object",
"properties": {
Expand All @@ -132,18 +132,14 @@
"type": "string"
},
"preview": {
"type": "string",
"description": "URL to a preview image of the font family."
"description": "URL to a preview image of the font family.",
"type": "string"
},
"fontFace": {
"description": "Array of font-face definitions.",
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/definitions/fontFace"
}
]
"$ref": "#/definitions/fontFace"
}
}
},
Expand All @@ -155,8 +151,8 @@
"additionalProperties": false
},
"categories": {
"type": "array",
"description": "Array of category slugs.",
"type": "array",
"items": {
"type": "string"
}
Expand Down
8 changes: 4 additions & 4 deletions tests/external-schemas/font-face.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@
},
"fontWeight": {
"description": "List of available font weights, separated by a space.",
"default": "400",
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
],
"default": "400"
},
"fontDisplay": {
"description": "CSS font-display value.",
"type": "string",
"default": "fallback",
"enum": [
"auto",
"block",
"fallback",
"swap",
"optional"
]
],
"default": "fallback"
},
"src": {
"description": "Paths or URLs to the font files.",
Expand Down
8 changes: 8 additions & 0 deletions tests/output/fonts.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@
'font-face',
[
'definitions',
'settingsTypographyProperties',
'properties',
'typography',
'properties',
'fontFamilies',
'items',
'properties',
'fontFace',
'items',
]
);

0 comments on commit 2d33ed6

Please sign in to comment.