From c16a4d78d07e81ecdd2ff9b1b9090560ab2fe488 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 04 Sep 2026 22:25:09 +0000
Subject: [PATCH] =Got the panel loading up the fields, organized by section! Now to ensure it saves properly. Still need to add: upload fields, selector fields, repeater/taglist/group fields
---
src/editor-fields/index.js | 20 ++++----------------
1 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/src/editor-fields/index.js b/src/editor-fields/index.js
index 74703bf..13eff99 100644
--- a/src/editor-fields/index.js
+++ b/src/editor-fields/index.js
@@ -1,13 +1,12 @@
import { registerPlugin } from '@wordpress/plugins';
import SidePanel from './SidePanel';
-import { PluginDocumentSettingPanel } from '@wordpress/editor';
-import { useEntityProp } from '@wordpress/core-data';
+
+
import Fields from './Fields';
const CustomFieldsPanel = () => {
- const { postType, fields } = window.jvbFieldConfig || {};
- const [meta, setMeta] = useEntityProp('postType', postType, 'meta');
+
if (!fields || !fields.length) {
return null;
@@ -15,18 +14,7 @@
const setField = (name, value) => setMeta({ ...meta, [name]: value });
- return (
- <PluginDocumentSettingPanel name="jvb-custom-fields" title="Custom Fields">
- {fields.map((field) => (
- <Fields
- key={field.name}
- field={field}
- value={meta?.[field.name]}
- onChange={(value) => setField(field.name, value)}
- />
- ))}
- </PluginDocumentSettingPanel>
- );
+
};
registerPlugin('jvb-meta-fields', {
--
Gitblit v1.10.0