| @@ -51,10 +51,17 @@ | ||
| 51 | 51 | module.exports = window.wp.blockLibrary; |
| 52 | 52 | } |
| 53 | 53 | }); |
| 54 | 54 | |
| 55 | +// package-external:@wordpress/core-data | |
| 56 | +var require_core_data = __commonJS({ | |
| 57 | + "package-external:@wordpress/core-data"(exports, module) { | |
| 58 | + module.exports = window.wp.coreData; | |
| 59 | + } | |
| 60 | +}); | |
| 61 | + | |
| 55 | 62 | // routes/guidelines/route.ts |
| 56 | -var import_i18n = __toESM(require_i18n()); | |
| 63 | +var import_i18n2 = __toESM(require_i18n()); | |
| 57 | 64 | |
| 58 | 65 | // routes/guidelines/bootstrap-block-registry.ts |
| 59 | 66 | var import_data = __toESM(require_data()); |
| 60 | 67 | var import_blocks = __toESM(require_blocks()); |
| @@ -68,12 +75,38 @@ | ||
| 68 | 75 | (0, import_data.dispatch)(import_blocks.store).reapplyBlockTypeFilters(); |
| 69 | 76 | (0, import_block_library.registerCoreBlocks)(); |
| 70 | 77 | } |
| 71 | 78 | |
| 79 | +// routes/guidelines/entity.ts | |
| 80 | +var import_data2 = __toESM(require_data()); | |
| 81 | +var import_core_data = __toESM(require_core_data()); | |
| 82 | +var import_i18n = __toESM(require_i18n()); | |
| 83 | +var registered = false; | |
| 84 | +function registerGuidelineScopeEntity() { | |
| 85 | + if (registered) { | |
| 86 | + return; | |
| 87 | + } | |
| 88 | + registered = true; | |
| 89 | + (0, import_data2.dispatch)(import_core_data.store).addEntities([ | |
| 90 | + { | |
| 91 | + label: (0, import_i18n.__)("Guideline Scope"), | |
| 92 | + name: "guidelineScope", | |
| 93 | + kind: "root", | |
| 94 | + baseURL: "/wp/v2/knowledge/guideline-scopes", | |
| 95 | + plural: "guidelineScopes", | |
| 96 | + key: "slug", | |
| 97 | + supportsPagination: false | |
| 98 | + } | |
| 99 | + ]); | |
| 100 | +} | |
| 101 | + | |
| 72 | 102 | // routes/guidelines/route.ts |
| 73 | 103 | var route = { |
| 74 | - beforeLoad: bootstrapBlockRegistry, | |
| 75 | - title: () => (0, import_i18n.__)("Guidelines") | |
| 104 | + beforeLoad: () => { | |
| 105 | + bootstrapBlockRegistry(); | |
| 106 | + registerGuidelineScopeEntity(); | |
| 107 | + }, | |
| 108 | + title: () => (0, import_i18n2.__)("Guidelines") | |
| 76 | 109 | }; |
| 77 | 110 | export { |
| 78 | 111 | route |
| 79 | 112 | }; |