1182 | | $test = parse_url( $link_test ); |
1183 | | if ( isset( $test['query'] ) ) |
1184 | | $post_links[] = $link_test; |
1185 | | elseif ( $test['path'] != '/' && $test['path'] != '' ) |
1186 | | $post_links[] = $link_test; |
| 1182 | $test = @parse_url( $link_test ); |
| 1183 | if (false !== $test) { |
| 1184 | if ( isset( $test['query'] ) ) |
| 1185 | $post_links[] = $link_test; |
| 1186 | elseif ( $test['path'] != '/' && $test['path'] != '' ) |
| 1187 | $post_links[] = $link_test; |
| 1188 | } |
1200 | | $url_parts = parse_url( $url ); |
1201 | | $extension = pathinfo( $url_parts['path'], PATHINFO_EXTENSION ); |
1202 | | if ( !empty( $extension ) ) { |
1203 | | foreach ( get_allowed_mime_types( ) as $exts => $mime ) { |
1204 | | if ( preg_match( '!^(' . $exts . ')$!i', $extension ) ) { |
1205 | | $type = $mime; |
1206 | | break; |
| 1202 | $url_parts = @parse_url( $url ); |
| 1203 | if (false !== $url_parts) { |
| 1204 | $extension = pathinfo( $url_parts['path'], PATHINFO_EXTENSION ); |
| 1205 | if ( !empty( $extension ) ) { |
| 1206 | foreach ( get_allowed_mime_types( ) as $exts => $mime ) { |
| 1207 | if ( preg_match( '!^(' . $exts . ')$!i', $extension ) ) { |
| 1208 | $type = $mime; |
| 1209 | break; |
| 1210 | } |