-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
API endpoint to ease rendering shortcodes #5214
Comments
There are problems with js and css, footer and header scripts for localisation. I'm currently circumventing those with output buffered It looks like the
GISThttps://gist.github.com/Lewiscowles1986/5d709e6c15d72ab8894442cb6f76392f ProblemsThere is a lot of nonsense added to the output with a raw call to wp_header()
wp_footer()
|
Sorry closed |
Issue Overview
Whilst working on #4733 I noticed the current implementation in the admin UI differed in it's displayed output from my modifications. I assumed (probably stupidly) this was a problem with the PHP code I made. It looks like there is an admin back-end renderer in JS, and a front-end renderer in PHP.
I now believe it would just be less effort to (for some elements) just display the output of a shortcode (it'd have 1:1 parity with output), and still be de-coupled from the admin. Something like
/wp/v2/shortcode/shortcodename/post_id_context/
optionally passing a body or query params for shortcode arguments.Related Issues and/or PRs
#4733
#4961
could make irrelevant
#805 (just use & enhance the existing shortcodes for audio & video)
#3896 (the oEmbed endpoint I'm failing to call is a wrapper around a shortcode)
other benefits
Shortcodes could be easier to display in the admin-editor
Todos
The text was updated successfully, but these errors were encountered: