Changeset 36307 for trunk/src/wp-includes/embed.php
- Timestamp:
- 01/15/2016 07:55:19 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/embed.php
r36059 r36307 346 346 $output = ''; 347 347 348 if ( is_singular() && ! is_front_page()) {348 if ( is_singular() ) { 349 349 $output .= '<link rel="alternate" type="application/json+oembed" href="' . esc_url( get_oembed_endpoint_url( get_permalink() ) ) . '" />' . "\n"; 350 350 … … 388 388 } 389 389 390 if ( get_option( 'permalink_structure' ) ) { 391 $embed_url = trailingslashit( get_permalink( $post ) ) . user_trailingslashit( 'embed' ); 392 } else { 390 $embed_url = trailingslashit( get_permalink( $post ) ) . user_trailingslashit( 'embed' ); 391 $path_conflict = get_page_by_path( str_replace( home_url(), '', $embed_url ), OBJECT, get_post_types( array( 'public' => true ) ) ); 392 393 if ( ! get_option( 'permalink_structure' ) || $path_conflict ) { 393 394 $embed_url = add_query_arg( array( 'embed' => 'true' ), get_permalink( $post ) ); 394 395 }
Note: See TracChangeset
for help on using the changeset viewer.