Make WordPress Core


Ignore:
Timestamp:
09/30/2017 01:14:34 AM (7 years ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/external-http/oembed.php

    r35178 r41651  
    3636        global $wp_embed;
    3737        $out = $wp_embed->autoembed( 'https://www.youtube.com/embed/QcIy9NiNbmo' );
    38         $this->assertContains( 'https://youtube.com/watch?v=QcIy9NiNbmo', $out );
     38        $this->assertContains( 'https://www.youtube.com/embed/QcIy9NiNbmo?feature=oembed', $out );
    3939    }
    4040
     
    4242        global $wp_embed;
    4343        $out = $wp_embed->autoembed( 'https://www.youtube.com/v/QcIy9NiNbmo' );
    44         $this->assertContains( 'https://youtube.com/watch?v=QcIy9NiNbmo', $out );
     44        $this->assertContains( 'https://www.youtube.com/embed/QcIy9NiNbmo?feature=oembed', $out );
    4545    }
    4646}
Note: See TracChangeset for help on using the changeset viewer.