Ticket #23431: 23431.2.diff
File 23431.2.diff, 1.2 KB (added by , 10 years ago) |
---|
-
src/wp-includes/class-wp-embed.php
19 19 // Hack to get the [embed] shortcode to run before wpautop() 20 20 add_filter( 'the_content', array( $this, 'run_shortcode' ), 8 ); 21 21 22 // Shortcode placeholder for strip_shortcodes()23 add_shortcode( 'embed', '__return_false');22 // Shortcode callback. 23 add_shortcode( 'embed', array( $this, 'shortcode' ) ); 24 24 25 25 // Attempts to embed all URLs in a post 26 26 add_filter( 'the_content', array( $this, 'autoembed' ), 8 ); -
tests/phpunit/tests/shortcode.php
373 373 remove_filter( 'shortcode_atts_bartag', array( $this, '_filter_atts2' ), 10, 3 ); 374 374 } 375 375 376 /** 377 * @ticket 23431 378 */ 379 function test_embed_shortcode() { 380 $content = '[embed]http://example.org/path/to/video.mp4[/embed]'; 381 $this->assertNotEmpty( do_shortcode( $content ) ); 382 } 376 383 }