mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 23:58:03 +00:00
Embeds: Cache oEmbeds in an oembed_cache custom post type instead of postmeta when there is no global $post.
Add processing of embeds to rich Text widget. Props swissspidy, westonruter, ocean90, johnbillion. See #40854, #39994, #40935. Fixes #34115. git-svn-id: https://develop.svn.wordpress.org/trunk@41651 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -35,12 +35,12 @@ class Tests_External_HTTP_OEmbed extends WP_UnitTestCase {
|
||||
function test_youtube_embed_url() {
|
||||
global $wp_embed;
|
||||
$out = $wp_embed->autoembed( 'https://www.youtube.com/embed/QcIy9NiNbmo' );
|
||||
$this->assertContains( 'https://youtube.com/watch?v=QcIy9NiNbmo', $out );
|
||||
$this->assertContains( 'https://www.youtube.com/embed/QcIy9NiNbmo?feature=oembed', $out );
|
||||
}
|
||||
|
||||
function test_youtube_v_url() {
|
||||
global $wp_embed;
|
||||
$out = $wp_embed->autoembed( 'https://www.youtube.com/v/QcIy9NiNbmo' );
|
||||
$this->assertContains( 'https://youtube.com/watch?v=QcIy9NiNbmo', $out );
|
||||
$this->assertContains( 'https://www.youtube.com/embed/QcIy9NiNbmo?feature=oembed', $out );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user