diff --git a/wp-includes/class-wp-oembed-controller.php b/wp-includes/class-wp-oembed-controller.php index e6dae0670d..63cc1842ed 100644 --- a/wp-includes/class-wp-oembed-controller.php +++ b/wp-includes/class-wp-oembed-controller.php @@ -153,7 +153,7 @@ final class WP_oEmbed_Controller { * * @see WP_oEmbed::get_html() * @param WP_REST_Request $request Full data about the request. - * @return WP_Error|array oEmbed response data or WP_Error on failure. + * @return object|WP_Error oEmbed response data or WP_Error on failure. */ public function get_proxy_item( $request ) { $args = $request->get_params(); @@ -169,6 +169,14 @@ final class WP_oEmbed_Controller { $url = $request['url']; unset( $args['url'] ); + // Copy maxwidth/maxheight to width/height since WP_oEmbed::fetch() uses these arg names. + if ( isset( $args['maxwidth'] ) ) { + $args['width'] = $args['maxwidth']; + } + if ( isset( $args['maxheight'] ) ) { + $args['height'] = $args['maxheight']; + } + $data = _wp_oembed_get_object()->get_data( $url, $args ); if ( false === $data ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index c268353105..97ba853c30 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41046'; +$wp_version = '4.9-alpha-41047'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.