[wp-trac] [WordPress Trac] #46063: echo in functions called by add_shortcode()
WordPress Trac
noreply at wordpress.org
Tue Jan 22 13:04:55 UTC 2019
#46063: echo in functions called by add_shortcode()
--------------------------+-----------------------------------
Reporter: kaikli | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: REST API | Version: 5.0.3
Severity: normal | Resolution: invalid
Keywords: | Focuses: javascript, rest-api
--------------------------+-----------------------------------
Changes (by johnbillion):
* status: new => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
Thanks for the report @kaikli . Shortcode callback functions shouldn't
echo their output, only return it. If your shortcode handler returns its
output, then the REST API will work as expected.
More info here: https://codex.wordpress.org/Shortcode_API
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46063#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list