Embeds: In `get_oembed_endpoint_url()`, avoid inadvertent stomping of the `$format` parameter passed to `oembed_endpoint_url` filter.
Props danhgilmore. Fixes #37751. Built from https://develop.svn.wordpress.org/trunk@38321 git-svn-id: http://core.svn.wordpress.org/trunk@38262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
44aac380f4
commit
c86199ddb2
|
@ -380,14 +380,10 @@ function get_post_embed_url( $post = null ) {
|
|||
function get_oembed_endpoint_url( $permalink = '', $format = 'json' ) {
|
||||
$url = rest_url( 'oembed/1.0/embed' );
|
||||
|
||||
if ( 'json' === $format ) {
|
||||
$format = false;
|
||||
}
|
||||
|
||||
if ( '' !== $permalink ) {
|
||||
$url = add_query_arg( array(
|
||||
'url' => urlencode( $permalink ),
|
||||
'format' => $format,
|
||||
'format' => ( 'json' !== $format ) ? $format : false,
|
||||
), $url );
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38320';
|
||||
$wp_version = '4.7-alpha-38321';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue