Closed emhoracek closed 7 years ago
There is some runtime cost associated (assuming this is happening on each request), but possibly not enough to justify it. But yeah, main drawback is just ugly templates. Perhaps you could add an "Auto" field that traversed from that point down in the JSON tree? Assuming the custom fields were all from a given root, then you could have nice tag names for everything not on that path.
We did this! https://github.com/positiondev/offset/pull/28 We were mostly trying to solve for custom endpoints, but you can use it for this problem!
After we finished adding it, David also realized that, using custom endpoints, Offset could interface with any API, not just WordPress. It's kinda amazing!!
Say there are a LOT of complicated custom fields. Instead of manually looking at the JSON making an Offset Field spec for each one, could a script automagically create the tags? It seems like a mechanical enough task. Are there any drawbacks to this? (Besides ugly front-end templates.)