-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Register fields to Wordpress internals #1348
Comments
@radeno I read about this meta functions, but to be honest, I didn't find any usage of them. Do you have any example? |
Not really. But it looks like WP moving from CMS to CMF (what is good). Define functional data blocks (post types, taxonomies and meta fields) and let community to offer UI/UX based on it. |
Thanks for the details. That sounds a good reason to implement this! |
Yep it is. But it depends which fields/field types are compatible. |
Hi @rilwis, just curious here. Did something change in regards to this feature request? It would be very interesting for a project I'm consulting on if this plugin offered direct integration with the internal metadata functionality. Would be nice if there was a way to use the custom fields and relations defined by this plugin, register them with WP using register_meta and even map them to the correct JSON Schema (for validation etc). I don't think this is currently implemented in the REST API Add-on, but I can be mistaken, of course. |
Hi @vdwijngaert , This hasn't been implemented in the plugin. Currently, for using fields with REST API, the MB REST API plugin is enough. Would you like to contribute to the plugin with this feature? |
Issue Overview
WP allows register meta fields in similar way as is for PostType or Taxonomy. Main difference is that it doesn't have as many as functions as MetaBox, but it is more or less standardized workflow to define post/term/etc fields.
Most MetaBox can be reinitialized with WP functions https://developer.wordpress.org/reference/functions/register_meta/ or shortcut functions for posts or terms https://developer.wordpress.org/reference/functions/register_post_meta/ https://developer.wordpress.org/reference/functions/register_post_meta/
With sanitizing,
name
+description
(as description field),multiple
(single as false) andclone
(object or array type) support orclone_as_multiple
(single false + object type).Expected Behavior
Developer can use built-in functions as https://developer.wordpress.org/reference/functions/get_registered_meta_keys/ and all related functions.
Current Behavior
WP doesn't any clue except MetaBox about registered meta fields.
Possible Solution
As Extensions module to MetaBox, no needed in core.
The text was updated successfully, but these errors were encountered: