[wp-trac] [WordPress Trac] #28639: WP_Embed::cache_oembed() only works for posts and pages by default

WordPress Trac noreply at wordpress.org
Thu Jun 26 03:00:06 UTC 2014


#28639: WP_Embed::cache_oembed() only works for posts and pages by default
--------------------------+------------------------------
 Reporter:  helen         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Embeds        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by helen):

 I would recommend just killing that check entirely - a quick search of
 plugins turned up no results for the hook. If we want to keep the hook,
 then we should pass all registered post types and let it become an unset
 instead. Since this is only called in core by `wp_ajax_oembed_cache()`, it
 would only happen for post types with an edit screen by default. If
 somebody is calling this manually, I hope they are passing the appropriate
 post ID.

 If we're concerned about revisions, we should check if it's a revision
 rather than artificially limiting the post types, and `update_post_meta()`
 already handles that anyway.

 Interested in any recollection anyone has over why this was done this way.
 Asked Viper007Bond, who doesn't remember anything specific. He did note
 that there was this comment in the original commit ([12023]): `//
 post_type check is incase of "save_post" usage`

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


More information about the wp-trac mailing list