[wp-trac] [WordPress Trac] #49627: oEmbedding - Privacy by design - Inconsistencies & Legal concerns

WordPress Trac noreply at wordpress.org
Thu Mar 12 13:55:54 UTC 2020


#49627: oEmbedding - Privacy by design - Inconsistencies & Legal concerns
--------------------------+------------------------------------------------
 Reporter:  arena         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  ui, javascript, rest-api, privacy
--------------------------+------------------------------------------------

Comment (by SergeyBiryukov):

 Replying to [ticket:49627 arena]:
 > oEmbedding is now driven by two files :
 >
 > * {{{wp-includes/class-wp-oembed.php}}}  and its list of "popular"
 oEmbed providers : array ( pattern => array( oembed_url, regex [boolean] )
 )
 >
 > This list is loaded in {{{wp-settings.php}}} with this instruction :
 {{{$GLOBALS['wp_embed'] = new WP_Embed();}}}
 > This list of providers is filterable with hook {{{'oembed_providers'}}},
 but the hook appears to be fired before {{{'plugins_loaded'}}} and
 {{{'init'}}} hooks.

 Note the difference between `WP_Embed` and `WP_oEmbed`.

 The former is indeed created early in `wp-settings.php`, but that does not
 create the `WP_oEmbed` object.

 The latter is created in `_wp_oembed_get_object()` after plugins are
 loaded. `wp_oembed_add_provider()` and `wp_oembed_remove_provider()`
 specifically check for `did_action( 'plugins_loaded' )`.

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


More information about the wp-trac mailing list