diff --git a/composer.json b/composer.json index d258ced..eb20e1a 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/packages/wp-types/index.ts b/packages/wp-types/index.ts index 15e6ca0..72172c5 100644 --- a/packages/wp-types/index.ts +++ b/packages/wp-types/index.ts @@ -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; diff --git a/schemas/block-template.json b/schemas/block-template.json index a8a9891..e3114bf 100644 --- a/schemas/block-template.json +++ b/schemas/block-template.json @@ -19,6 +19,7 @@ "has_theme_file", "is_custom", "author", + "plugin", "post_types", "modified", "area" @@ -75,6 +76,12 @@ "null" ] }, + "plugin": { + "type": [ + "string", + "null" + ] + }, "post_types": { "type": [ "array", diff --git a/tests/external-schemas/font-collection.json b/tests/external-schemas/font-collection.json index 05f4657..1b37d3b 100644 --- a/tests/external-schemas/font-collection.json +++ b/tests/external-schemas/font-collection.json @@ -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.", @@ -23,7 +22,6 @@ }, "fontWeight": { "description": "List of available font weights, separated by a space.", - "default": "400", "oneOf": [ { "type": "string" @@ -31,19 +29,20 @@ { "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.", @@ -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": { @@ -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" } } }, @@ -155,8 +151,8 @@ "additionalProperties": false }, "categories": { - "type": "array", "description": "Array of category slugs.", + "type": "array", "items": { "type": "string" } diff --git a/tests/external-schemas/font-face.json b/tests/external-schemas/font-face.json index 757e0e4..a9f791a 100644 --- a/tests/external-schemas/font-face.json +++ b/tests/external-schemas/font-face.json @@ -13,7 +13,6 @@ }, "fontWeight": { "description": "List of available font weights, separated by a space.", - "default": "400", "oneOf": [ { "type": "string" @@ -21,19 +20,20 @@ { "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.", diff --git a/tests/output/fonts.php b/tests/output/fonts.php index 1c0f643..b66f589 100644 --- a/tests/output/fonts.php +++ b/tests/output/fonts.php @@ -59,6 +59,14 @@ 'font-face', [ 'definitions', + 'settingsTypographyProperties', + 'properties', + 'typography', + 'properties', + 'fontFamilies', + 'items', + 'properties', 'fontFace', + 'items', ] );