Render Shortcodes before sending JSON
bbttxu opened this issue · 1 comments
bbttxu commented
I'm using Thermal API for a project, and just came across the fact that WP shortcodes aren't rendered to HTML prior to being sent out as JSON. Was wondering if this functionality had been discussed, or how difficult it might be to implement?
I'd be happy to take a look at implementing this if you had any guidance on where to get started.
Thanks for the cool project!
jeffstieler commented
You can use the thermal_post_entity
filter to modify the post object returned.
In your filter, you can use do_shortcode
or apply_filters('the_content', $data['post_content']);
.