diff --git a/src/wp-includes/class-oembed.php b/src/wp-includes/class-oembed.php
index 363b7c9..381d3d0 100644
a
|
b
|
class WP_oEmbed { |
277 | 277 | * @return bool|object False on failure, otherwise the result in the form of an object. |
278 | 278 | */ |
279 | 279 | public function fetch( $provider, $url, $args = '' ) { |
280 | | $args = wp_parse_args( $args, wp_embed_defaults() ); |
| 280 | $args = wp_parse_args( $args, wp_embed_defaults( $url ) ); |
281 | 281 | |
282 | 282 | $provider = add_query_arg( 'maxwidth', (int) $args['width'], $provider ); |
283 | 283 | $provider = add_query_arg( 'maxheight', (int) $args['height'], $provider ); |
diff --git a/src/wp-includes/class-wp-embed.php b/src/wp-includes/class-wp-embed.php
index fbcd517..cfaa73b 100644
a
|
b
|
class WP_Embed { |
150 | 150 | return ''; |
151 | 151 | |
152 | 152 | $rawattr = $attr; |
153 | | $attr = wp_parse_args( $attr, wp_embed_defaults() ); |
| 153 | $attr = wp_parse_args( $attr, wp_embed_defaults( $url ) ); |
154 | 154 | |
155 | 155 | // kses converts & into & and we need to undo this |
156 | 156 | // See http://core.trac.wordpress.org/ticket/11311 |
diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
index 2edfc1a..6c679f9 100644
a
|
b
|
function wp_embed_unregister_handler( $id, $priority = 10 ) { |
2059 | 2059 | * |
2060 | 2060 | * @since 2.9.0 |
2061 | 2061 | * |
| 2062 | * @param string $url Optional. The URL that should be embedded. Default empty. |
| 2063 | * |
2062 | 2064 | * @return array Default embed parameters. |
2063 | 2065 | */ |
2064 | | function wp_embed_defaults() { |
| 2066 | function wp_embed_defaults( $url = '' ) { |
2065 | 2067 | if ( ! empty( $GLOBALS['content_width'] ) ) |
2066 | 2068 | $width = (int) $GLOBALS['content_width']; |
2067 | 2069 | |
… |
… |
function wp_embed_defaults() { |
2077 | 2079 | * |
2078 | 2080 | * @param int $width Width of the embed in pixels. |
2079 | 2081 | * @param int $height Height of the embed in pixels. |
| 2082 | * @param string $url The URL that should be embedded by default. |
2080 | 2083 | */ |
2081 | | return apply_filters( 'embed_defaults', compact( 'width', 'height' ) ); |
| 2084 | return apply_filters( 'embed_defaults', compact( 'width', 'height' ), $url ); |
2082 | 2085 | } |
2083 | 2086 | |
2084 | 2087 | /** |