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.

Fixes #35194 for trunk.


Built from https://develop.svn.wordpress.org/trunk@36059


git-svn-id: http://core.svn.wordpress.org/trunk@36024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2015-12-22 10:50:31 +00:00
parent e638f72a9a
commit 324cbf5d7e
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.5-alpha-36056';
$wp_version = '4.5-alpha-36059';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.