Changeset 11994 for trunk/wp-admin/press-this.php
- Timestamp:
- 10/03/2009 07:14:44 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/press-this.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/press-this.php
r11982 r11994 193 193 */ 194 194 function get_images_from_uri($uri) { 195 if( preg_match('/\.(jpg|jpe|jpeg|png|gif) /', $uri) && !strpos($uri,'blogger.com') )195 if( preg_match('/\.(jpg|jpe|jpeg|png|gif)$/', $uri) && !strpos($uri,'blogger.com') ) 196 196 return "'".html_entity_decode($uri)."'"; 197 197 $content = wp_remote_fopen($uri); … … 199 199 return ''; 200 200 $host = parse_url($uri); 201 $pattern = '/<img ([^>]*)src=(\"|\')([^<>]+?\.(png|jpeg|jpg|jpe|gif)[^<>\'\"]*)(\2)([^> \/]*)\/*>/is';201 $pattern = '/<img ([^>]*)src=(\"|\')([^<>]+?\.(png|jpeg|jpg|jpe|gif)[^<>\'\"]*)(\2)([^>]*)\/*>/is'; 202 202 preg_match_all($pattern, $content, $matches); 203 203 if ( empty($matches[0]) )
Note: See TracChangeset
for help on using the changeset viewer.