WP 4.6 integration with register_meta() #6718
Replies: 4 comments
-
Need to add the code here: |
Beta Was this translation helpful? Give feedback.
-
I want to do this now but I feel like it might be too heavy to run this for every single pod field (for a WP object) prior to 2.8's PodsObject |
Beta Was this translation helpful? Give feedback.
-
To further explain, if we just run it in PodsRESTFields, it won't hit all fields because it would only register for fields that a user has access to or fields that have read/write set on them for REST purposes (entirely separate context from meta which can be used apart from the REST API) |
Beta Was this translation helpful? Give feedback.
-
Link from #4096 -> https://core.trac.wordpress.org/ticket/40318 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We should start utilizing
register_meta()
if WP 4.6+ to register our meta keys for each content type. Same way we doregister_post_type()
(cached info to make it easy to run the registers without a bunch of requests).We can enable
show_in_rest
if REST is enabled for that field, but we'll still need to keep theregister_rest_field()
calls in place until the WP REST API merges their new meta endpoint(s) into core and that function is no longer needed (likely a WP 4.7+ check).Beta Was this translation helpful? Give feedback.
All reactions