diff --git a/src/wp-includes/class-wp-embed.php b/src/wp-includes/class-wp-embed.php
index 7519b0bf77..e0986852ab 100644
|
a
|
b
|
class WP_Embed { |
| 35 | 35 | add_filter( 'widget_block_content', array( $this, 'run_shortcode' ), 8 ); |
| 36 | 36 | |
| 37 | 37 | // Shortcode placeholder for strip_shortcodes(). |
| 38 | | add_shortcode( 'embed', '__return_false' ); |
| | 38 | add_shortcode( 'embed', array( $this, 'shortcode' ) ); |
| 39 | 39 | |
| 40 | 40 | // Attempts to embed all URLs in a post. |
| 41 | 41 | add_filter( 'the_content', array( $this, 'autoembed' ), 8 ); |
diff --git a/tests/phpunit/tests/oembed/WpEmbed.php b/tests/phpunit/tests/oembed/WpEmbed.php
index eb64f084e7..d2594d6c8a 100644
|
a
|
b
|
class Tests_WP_Embed extends WP_UnitTestCase { |
| 377 | 377 | $this->wp_embed->linkifunknown = false; |
| 378 | 378 | $this->assertSame( $url, $this->wp_embed->maybe_make_link( $url ) ); |
| 379 | 379 | } |
| | 380 | |
| | 381 | /** |
| | 382 | * @ticket 23431 |
| | 383 | */ |
| | 384 | public function test_embed_shortcode() { |
| | 385 | $content = '[embed]https://example.org/path/to/video[/embed]'; |
| | 386 | $this->assertNotEmpty( do_shortcode( $content ) ); |
| | 387 | } |
| 380 | 388 | } |