[wp-trac] [WordPress Trac] #34274: _oembed_create_xml() uses SimpleXML, which can be disabled
WordPress Trac
noreply at wordpress.org
Thu Oct 15 13:50:50 UTC 2015
#34274: _oembed_create_xml() uses SimpleXML, which can be disabled
-----------------------------------+--------------------
Reporter: johnbillion | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 4.4
Component: Embeds | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion | Focuses:
-----------------------------------+--------------------
Changes (by swissspidy):
* keywords: needs-patch => has-patch 2nd-opinion
Comment:
We [https://github.com/swissspidy/oEmbed-API/issues/11 originally] added
XML support to the plugin because it seemed easy to do so. Before that, we
sent a 501 when requesting something else than JSON.
Using string building isn't my favorite option. Checking for SimpleXML and
sending a 501 if it isn't available is easier (see
[attachment:34274_a.diff]).
However, I don't think there really are many people using XML for oEmbed.
Removing that completely would simplify many parts of the oEmbed
functionality (see [attachment:34274_b.diff]). If someone really wants
XML, I can write a plugin for that.
When considering that the REST API is JSON-only and we might use that for
the endpoint (see #34207), encouraging users to use JSON would make even
more sense.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34274#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list