fix(cpt): remove rest_namespace so Gutenberg block editor can load peptide posts (v0.3.2)

Removes rest_namespace => pr-core/v1 from CPT registration. Gutenberg fetches wp/v2 hardcoded — custom namespace caused 404 and editor crash on all 89 peptide entries. WordPress defaults to wp/v2.

QA: PASS (2026-04-25-9d4ce64c.md)
CI: green
PR: #5
This commit is contained in:
peptiderepo
2026-04-25 01:57:30 +07:00
committed by GitHub
parent deadccc27b
commit 3050292fcf
4 changed files with 11 additions and 5 deletions

View File

@@ -184,7 +184,8 @@ class PR_Core_Peptide_CPT {
'show_in_nav_menus' => true,
'show_in_rest' => true,
'rest_base' => 'peptides',
'rest_namespace' => 'pr-core/v1',
// 'rest_namespace' omitted — custom namespaces break Gutenberg
// (it fetches wp/v2 hardcoded). WordPress defaults to wp/v2. (#5)
'menu_position' => 25,
'menu_icon' => 'dashicons-database',
'capability_type' => 'post',