wp-api-customize-endpoints
wp-api-customize-endpoints copied to clipboard
What to do about rendering?
Panels, sections, and controls have methods for rendering the control's markup or a template for client-side rendering. How should these get expressed in the REST API endpoints? Should they be excluded? Should we essentially deprecate rendered objects and only support templates via the REST API? If so, how then should clients access the templates that are defined in the render_template methods? We should be forward-thinking here as well. What would the ideal look like here for Customizer that is rendered via the REST API? Instead of an Underscore template string, should this instead return the (for example) React component name?