mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@36059 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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' ) ) {
|
||||
|
||||
Reference in New Issue
Block a user