Changeset 14116 for trunk/wp-includes/functions.php
- Timestamp:
- 04/16/2010 07:48:30 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r14108 r14116 1198 1198 foreach ( (array) $post_links_temp[0] as $link_test ) { 1199 1199 if ( !in_array( $link_test, $pung ) ) { // If we haven't pung it already 1200 $test = parse_url( $link_test ); 1200 $test = @parse_url( $link_test ); 1201 if ( false === $test ) 1202 continue; 1201 1203 if ( isset( $test['query'] ) ) 1202 1204 $post_links[] = $link_test; … … 1216 1218 // Check to see if we can figure out the mime type from 1217 1219 // the extension 1218 $url_parts = parse_url( $url ); 1219 $extension = pathinfo( $url_parts['path'], PATHINFO_EXTENSION ); 1220 if ( !empty( $extension ) ) { 1221 foreach ( get_allowed_mime_types( ) as $exts => $mime ) { 1222 if ( preg_match( '!^(' . $exts . ')$!i', $extension ) ) { 1223 $type = $mime; 1224 break; 1220 $url_parts = @parse_url( $url ); 1221 if ( false !== $url_parts ) { 1222 $extension = pathinfo( $url_parts['path'], PATHINFO_EXTENSION ); 1223 if ( !empty( $extension ) ) { 1224 foreach ( get_allowed_mime_types( ) as $exts => $mime ) { 1225 if ( preg_match( '!^(' . $exts . ')$!i', $extension ) ) { 1226 $type = $mime; 1227 break; 1228 } 1225 1229 } 1226 1230 }
Note: See TracChangeset
for help on using the changeset viewer.