[WIP] Implement JSON-based post type, taxonomy, and field loading system #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.
Original prompt
This section details on the original issue you should resolve
<issue_title>Implement JSON-based Post Type, Taxonomy, and Field Loading System</issue_title>
<issue_description>## Overview
Implement a JSON-based loading system for post types, taxonomies, and custom fields, similar to the Tour Operator content models system.
This will replace the current hardcoded PHP classes (
class-post-types.php,class-taxonomies.php,class-fields.php) with a dynamic loader that reads from JSON configuration files.Goals
/post-types/folder{{mustache}}placeholders for generator compatibilitypost-type.jsonfilesReference Implementation
Github
Tour Operator Implementation:
/post-types/*.jsonContent_Model_Json_InitializerContent_Model_ManagerProposed Structure
1. Directory Structure
2. JSON Schema Requirements
The
post-type.jsonschema should include all parameters from:register_post_type()Parameterslabel(string)labels(object with all label variations)description(string)public(boolean)hierarchical(boolean)exclude_from_search(boolean)publicly_queryable(boolean)show_ui(boolean)show_in_menu(boolean|string)show_in_nav_menus(boolean)show_in_admin_bar(boolean)show_in_rest(boolean)rest_base(string)rest_namespace(string)rest_controller_class(string)menu_position(integer)menu_icon(string)capability_type(string)capabilities(object)map_meta_cap(boolean)supports(array)register_meta_box_cb(string)taxonomies(array)has_archive(boolean|string)rewrite(object|boolean)query_var(boolean|string)can_export(boolean)delete_with_user(boolean)template(array)template_lock(string|boolean)_builtin(boolean)_edit_link(string)register_taxonomy()Parametersslug(string)object_type(array) - which post types to associate withlabels(object)description(string)public(boolean)publicly_queryable(boolean)hierarchical(boolean)show_ui(boolean)show_in_menu(boolean)show_in_nav_menus(boolean)show_in_rest(boolean)rest_base(string)rest_namespace(string)rest_controller_class(string)show_tagcloud(boolean)show_in_quick_edit(boolean)show_admin_column(boolean)meta_box_cb(string|boolean)meta_box_sanitize_cb(string)capabilities(object)rewrite(object|boolean)query_var(string|boolean)update_count_callback(string)default_term(string|array)sort(boolean)args(array)_builtin(boolean)SCF (Secure Custom Fields) Parameters
fields(array of field objects)slug(string)type(string) - text, textarea, number, email, url, password, wysiwyg, oembed, image, file, gallery, select, checkbox, radio, true_false, link, post_object, relationship, taxonomy, user, etc.label(string)description(string)required(boolean)conditional_logic(array)wrapper(object)default_value(mixed)placeholder(string)prepend(string)append(string)maxlength(integer)readonly(boolean)disabled(boolean)return_format(string)library(string)min_size(string)max_size(string)mime_types(string)choices(object) - for select/radio/checkboxallow_null(boolean)multiple(boolean)ui(boolean)ajax(boolean)post_type(array)taxonomy(array)filters(array)💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.