[wp-trac] [WordPress Trac] #43136: WP_oEmbed_Controller->get_item() returns a blockquote without the data-secret attribute

WordPress Trac noreply at wordpress.org
Sun Jan 21 09:04:28 UTC 2018


#43136: WP_oEmbed_Controller->get_item() returns a blockquote without the data-
secret attribute
--------------------------+-----------------------------
 Reporter:  imath         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Embeds        |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  rest-api      |
--------------------------+-----------------------------
 Hi,

 Working on an [https://github.com/WordPress/gutenberg/pull/4226 issue]
 with Gutenberg about self embed posts, i've noticed this Rest controller's
 callback (`get_item()`) was not returning a reply containing the `data-
 secret` attributes the `wp-embed.js` script needs in order to hide the
 blockquote.

 That's probably because the filter `pre_oembed_result` is not fired.
 Resetting the `$data['html']` using the `wp_filter_pre_oembed_result()` is
 making sure the data-secret attribute is added when returning the reply.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43136>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list