Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#40758 closed defect (bug) (invalid)

Wordpress supporting oembed standards ?

Reported by: Arena94 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Embeds Keywords:
Focuses: Cc:


WordPress is making a good use of oembed standards.

However, things are much more complex when embedding wordpress content even for itself.

So, internally, Wordpress code do not support oembed standards ... http://oembed.com/

Such urls do not work



Change History (5)

#1 @ocean90
4 years ago

  • Keywords reporter-feedback added
  • Version trunk deleted

Hello @Arena94, can you elaborate a bit more on this one? Do you mean that WordPress should have a /oembed endpoint? Because that's not really a standard. It's all about the discovery part.

WordPress automatically adds the required link tags to the header so you should see something like this on http://mysite.tld/?p=172:

<link rel="alternate" type="application/json+oembed" href="http://mysite.tld/wp-json/oembed/1.0/embed?url=http%3A%2F%2Fmysite.tld%2F%3Fp%3D172" />
<link rel="alternate" type="text/xml+oembed" href="http://mysite.tld/wp-json/oembed/1.0/embed?url=http%3A%2F%2Fmysite.tld%2F%3Fp%3D172&#038;format=xml" />

#2 @Arena94
4 years ago


good point,

here is what i have

<link rel="alternate" type="application/json+oembed" href=";url=http%3A%2F%2F127.0.0.1%2Fwordpress%2F%3Fp%3D172" />
<link rel="alternate" type="text/xml+oembed" href=";url=http%3A%2F%2F127.0.0.1%2Fwordpress%2F%3Fp%3D172&#038;format=xml" />

both links have the following result :

{"code":"rest_missing_callback_param","message":"Missing parameter(s): url","data":{"status":400,"params":url?}}

and what i should have (with a much better result)

is it ok ?

#3 @ocean90
4 years ago

Thanks, that seems to be caused by some double escaping which converts the & into &#038;. Clicking the link in a HTML context (src or href attribute) should work though.

#4 @Arena94
4 years ago

  • Resolution set to invalid
  • Status changed from new to closed

so i close it

#5 @ocean90
4 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.