Embeds: Don't show embed discovery link on a static front page.

There's currently no iframe content being generated for a static front page. Giving out a link to that isn't an ideal user experience.

Props peterwilsoncc.

Merge of [36059] to the 4.4 branch.

Fixes #35194.


Built from https://develop.svn.wordpress.org/branches/4.4@36060


git-svn-id: http://core.svn.wordpress.org/branches/4.4@36025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2015-12-22 10:55:26 +00:00
parent 60965cc4a5
commit 9f78d3f9c3
2 changed files with 2 additions and 2 deletions

View File

@ -345,7 +345,7 @@ function wp_oembed_register_route() {
function wp_oembed_add_discovery_links() {
$output = '';
if ( is_singular() ) {
if ( is_singular() && ! is_front_page() ) {
$output .= '<link rel="alternate" type="application/json+oembed" href="' . esc_url( get_oembed_endpoint_url( get_permalink() ) ) . '" />' . "\n";
if ( class_exists( 'SimpleXMLElement' ) ) {

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4.1-alpha-36058';
$wp_version = '4.4.1-alpha-36060';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.