PluginProbe
Gutenberg / trunk
Gutenberg vtrunk
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/routes/guidelines/route.js +36 -3 23.2.2 → trunk View file →
@@ -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 };