[wp-trac] [WordPress Trac] #31502: Replace embed URL with error message if oEmbed provider returns an error

WordPress Trac noreply at wordpress.org
Sun Sep 6 12:09:42 UTC 2015


#31502: Replace embed URL with error message if oEmbed provider returns an error
----------------------------------------+------------------------------
 Reporter:  mbootsman                   |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Embeds                      |     Version:  2.9
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+------------------------------

Comment (by GaVrA):

 I added [attachment:31502.diff] patch that does the following:

 1. checks `response.success` and if that is `true` it shows embed html in
 `response.data.body`
 2. if `response.success` is `false` it runs `this.renderFail()`
 3. inside `this.renderFail()` I check for `response.data.type` and if it
 is equal to `not-embeddable` it shows an error and returns.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31502#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list