Skip to content

Commit

Permalink
Merge pull request ampproject#1070 from Automattic/fix/wpcom-extracti…
Browse files Browse the repository at this point in the history
…on-domain-check

Fix domain check for WP.com hosted files
  • Loading branch information
westonruter authored Apr 12, 2018
2 parents 5ba9f5b + 35e5615 commit 6fe62ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wpcom-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function wpcom_amp_extract_image_dimensions_from_querystring( $dimensions ) {
}

$host = wp_parse_url( $url, PHP_URL_HOST );
if ( ! wp_endswith( $host, '.wp.com' ) || ! wp_endswith( $host, '.files.wordpress.com' ) ) {
if ( ! wp_endswith( $host, '.wp.com' ) && ! wp_endswith( $host, '.files.wordpress.com' ) ) {
continue;
}

Expand Down

0 comments on commit 6fe62ed

Please sign in to comment.