mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-09 07:04:34 +00:00
oEmbed: if SimpleXMLElement does not exist, return an HTTP Error 501 Not implemented response.
Props swissspidy. Fixes #34274. git-svn-id: https://develop.svn.wordpress.org/trunk@35354 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -351,7 +351,10 @@ function wp_oembed_add_discovery_links() {
|
||||
|
||||
if ( is_singular() ) {
|
||||
$output .= '<link rel="alternate" type="application/json+oembed" href="' . esc_url( get_oembed_endpoint_url( get_permalink() ) ) . '" />' . "\n";
|
||||
$output .= '<link rel="alternate" type="text/xml+oembed" href="' . esc_url( get_oembed_endpoint_url( get_permalink(), 'xml' ) ) . '" />' . "\n";
|
||||
|
||||
if ( class_exists( 'SimpleXMLElement' ) ) {
|
||||
$output .= '<link rel="alternate" type="text/xml+oembed" href="' . esc_url( get_oembed_endpoint_url( get_permalink(), 'xml' ) ) . '" />' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user