Ticket #15133: dA_oembed.patch
| File dA_oembed.patch, 1.7 KB (added by , 15 years ago) |
|---|
-
wp-includes/class-oembed.php
54 54 'http://wordpress.tv/*' => array( 'http://wordpress.tv/oembed/', false ), 55 55 '#http://(answers|surveys)\.polldaddy.com/.*#i' => array( 'http://polldaddy.com/oembed/', true ), 56 56 '#http://(www\.)?funnyordie\.com/videos/.*#i' => array( 'http://www.funnyordie.com/oembed', true ), 57 '#http://(.+)\.deviantart\.com/art/.*#i' => array( 'http://backend.deviantart.com/oembed', true ), 58 '#http://(.+)\.deviantart\.com/(.+)/[\d]*#i' => array( 'http://backend.deviantart.com/oembed', true ), 59 'http://fav.me/*' => array( 'http://backend.deviantart.com/oembed', false ), 57 60 ) ); 58 61 59 62 // Fix any embeds that contain new lines in the middle of the HTML which breaks wpautop(). … … 242 245 return false; 243 246 244 247 $title = ( !empty($data->title) ) ? $data->title : ''; 245 $return = '<img src="' . esc_url( $data->url ) . '" alt="' . esc_attr($title) . '" width="' . esc_attr($data->width) . '" height="' . esc_attr($data->height) . '" />'; 248 249 if ( ! empty($data->thumbnail_url) ){ 250 $return = '<img src="' . esc_url( $data->thumbnail_url ) . '" alt="' . esc_attr($title) . '" width="' . esc_attr($data->thumbnail_width) . '" height="' . esc_attr($data->thumbnail_height) . '" />'; 251 } else { 252 $return = '<img src="' . esc_url( $data->url ) . '" alt="' . esc_attr($title) . '" width="' . esc_attr($data->width) . '" height="' . esc_attr($data->height) . '" />'; 253 } 246 254 break; 247 255 248 256 case 'video':