Changeset 36059
- Timestamp:
- 12/22/2015 10:49:20 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/embed.php
r35718 r36059 346 346 $output = ''; 347 347 348 if ( is_singular() ) {348 if ( is_singular() && ! is_front_page() ) { 349 349 $output .= '<link rel="alternate" type="application/json+oembed" href="' . esc_url( get_oembed_endpoint_url( get_permalink() ) ) . '" />' . "\n"; 350 350 -
trunk/tests/phpunit/tests/oembed/discovery.php
r35436 r36059 7 7 function test_add_oembed_discovery_links_non_singular() { 8 8 $this->assertSame( '', get_echo( 'wp_oembed_add_discovery_links' ) ); 9 } 10 11 function test_add_oembed_discovery_links_front_page() { 12 $this->go_to( home_url('/') ); 13 $this->assertSame( '', get_echo( 'wp_oembed_add_discovery_links' ) ); 14 } 15 16 function test_add_oembed_discovery_links_static_front_page() { 17 update_option( 'show_on_front', 'page' ); 18 update_option( 'page_for_posts', self::factory()->post->create( array( 'post_title' => 'blog-page', 'post_type' => 'page' ) ) ); 19 update_option( 'page_on_front', self::factory()->post->create( array( 'post_title' => 'front-page', 'post_type' => 'page' ) ) ); 20 21 $this->go_to( home_url('/') ); 22 $this->assertSame( '', get_echo( 'wp_oembed_add_discovery_links' ) ); 23 24 update_option( 'show_on_front', 'posts' ); 9 25 } 10 26
Note: See TracChangeset
for help on using the changeset viewer.