[wp-trac] [WordPress Trac] #37443: locate_template() fails when called in API context
WordPress Trac
noreply at wordpress.org
Fri Aug 5 03:20:41 UTC 2016
#37443: locate_template() fails when called in API context
-----------------------------------------+------------------------
Reporter: paulschreiber | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Themes | Version:
Severity: normal | Resolution: duplicate
Keywords: has-patch reporter-feedback | Focuses: template
-----------------------------------------+------------------------
Changes (by dd32):
* status: reopened => closed
* resolution: => duplicate
* milestone: Awaiting Review =>
Comment:
This is a very WordPress.com specific bug due to the way they serve API
requests, and for the most part isn't an issue for WordPress Core. (All
constants are set based on `public-api.wordpress.com` instead of on the
actual site being served in the API response)
However, removing the reliance upon constants and using functions which
return filtered versions of the constants is a reasonable thing to do that
will both help WordPress.com and future WordPress functionalities and
developers alike.
That ultimately means this is a duplicate of #18298, at least as far as
removing the usage of these constants in this spot goes.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37443#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list