Changeset 28923
- Timestamp:
- 06/30/2014 11:15:33 AM (10 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-oembed.php
r28846 r28923 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 ); -
trunk/src/wp-includes/class-wp-embed.php
r28919 r28923 157 157 158 158 $rawattr = $attr; 159 $attr = wp_parse_args( $attr, wp_embed_defaults( ) );159 $attr = wp_parse_args( $attr, wp_embed_defaults( $url ) ); 160 160 161 161 // kses converts & into & and we need to undo this -
trunk/src/wp-includes/media.php
r28901 r28923 2083 2083 * @since 2.9.0 2084 2084 * 2085 * @param string $url Optional. The URL that should be embedded. Default empty. 2086 * 2085 2087 * @return array Default embed parameters. 2086 2088 */ 2087 function wp_embed_defaults( ) {2089 function wp_embed_defaults( $url = '' ) { 2088 2090 if ( ! empty( $GLOBALS['content_width'] ) ) 2089 2091 $width = (int) $GLOBALS['content_width']; … … 2099 2101 * @since 2.9.0 2100 2102 * 2101 * @param int $width Width of the embed in pixels. 2102 * @param int $height Height of the embed in pixels. 2103 */ 2104 return apply_filters( 'embed_defaults', compact( 'width', 'height' ) ); 2103 * @param int $width Width of the embed in pixels. 2104 * @param int $height Height of the embed in pixels. 2105 * @param string $url The URL that should be embedded. 2106 */ 2107 return apply_filters( 'embed_defaults', compact( 'width', 'height' ), $url ); 2105 2108 } 2106 2109
Note: See TracChangeset
for help on using the changeset viewer.