diff --git a/readme.txt b/readme.txt index 60ab67e..897b97c 100755 --- a/readme.txt +++ b/readme.txt @@ -118,6 +118,10 @@ On the WP-Strava settings page you cannot currently remove and add another athle == Changelog == + += Unreleased = +Revised `block.json` based on feedback from https://wordpress.org/plugins/developers/block-plugin-validator/ + = 2.7.0 = Add setting to choose API cache interval (1 hour / 15 minutes) https://wordpress.org/support/topic/decrease-update-time-for-group-recent-activities/ Move block type metadata to `block.json` for future discoverability. diff --git a/src/blocks/activity/block.json b/src/blocks/activity/block.json index dbfc2ad..7152439 100644 --- a/src/blocks/activity/block.json +++ b/src/blocks/activity/block.json @@ -1,5 +1,4 @@ { - "apiVersion": 2, "name": "wp-strava/activity", "title": "Strava Activity", "category": "embed", @@ -25,7 +24,7 @@ "default": null } }, - "editorScript": "wp-strava-block", - "editorStyle": "wp-strava-block-editor", - "style": "wp-strava-block" + "editorScript": "file:../../../build/index.js", + "editorStyle": "file:../../../build/editor.css", + "style": "file:../../../build/style.css" } diff --git a/src/blocks/activity/index.js b/src/blocks/activity/index.js index d9e698a..70a50a1 100644 --- a/src/blocks/activity/index.js +++ b/src/blocks/activity/index.js @@ -6,7 +6,4 @@ import metadata from './block.json'; metadata.edit = edit; metadata.save = () => null; -// Leaving this in place causes problems with the toolbar. -delete metadata.apiVersion; - registerBlockType( metadata.name, metadata ); diff --git a/src/blocks/route/block.json b/src/blocks/route/block.json index 8fe11c1..42b76d3 100644 --- a/src/blocks/route/block.json +++ b/src/blocks/route/block.json @@ -1,5 +1,4 @@ { - "apiVersion": 2, "name": "wp-strava/route", "title": "Strava Route", "category": "embed", @@ -25,7 +24,7 @@ "default": null } }, - "editorScript": "wp-strava-block", - "editorStyle": "wp-strava-block-editor", - "style": "wp-strava-block" + "editorScript": "file:../../../build/index.js", + "editorStyle": "file:../../../build/editor.css", + "style": "file:../../../build/style.css" } diff --git a/src/blocks/route/index.js b/src/blocks/route/index.js index d9e698a..70a50a1 100644 --- a/src/blocks/route/index.js +++ b/src/blocks/route/index.js @@ -6,7 +6,4 @@ import metadata from './block.json'; metadata.edit = edit; metadata.save = () => null; -// Leaving this in place causes problems with the toolbar. -delete metadata.apiVersion; - registerBlockType( metadata.name, metadata );