Ticket #20358: image_hwstring_filter.patch
File image_hwstring_filter.patch, 1.0 KB (added by , 12 years ago) |
---|
-
media.php
101 101 $out .= 'width="'.intval($width).'" '; 102 102 if ($height) 103 103 $out .= 'height="'.intval($height).'" '; 104 return $out;104 return apply_filters( 'image_hwstring', $out ); 105 105 } 106 106 107 107 /** … … 1158 1158 return ''; 1159 1159 1160 1160 $rawattr = $attr; 1161 $attr = wp_parse_args( $attr, wp_embed_defaults( ) );1161 $attr = wp_parse_args( $attr, wp_embed_defaults( $url ) ); 1162 1162 1163 1163 // kses converts & into & and we need to undo this 1164 1164 // See http://core.trac.wordpress.org/ticket/11311 … … 1323 1323 * 1324 1324 * @return array Default embed parameters. 1325 1325 */ 1326 function wp_embed_defaults( ) {1326 function wp_embed_defaults( $url = '' ) { 1327 1327 if ( !empty($GLOBALS['content_width']) ) 1328 1328 $theme_width = (int) $GLOBALS['content_width']; 1329 1329 … … 1343 1343 return apply_filters( 'embed_defaults', array( 1344 1344 'width' => $width, 1345 1345 'height' => $height, 1346 ) );1346 ) , $url ); 1347 1347 } 1348 1348 1349 1349 /**