Skip to content

Commit

Permalink
fix: prefetch custom domain instead of the assigned one, when custom …
Browse files Browse the repository at this point in the history
…domain is used
  • Loading branch information
selul committed May 30, 2019
1 parent 2ee9997 commit cedbb79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion inc/app_replacer.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ protected static function size_to_crop() {
*
* @return array
* @global $wp_additional_image_sizes
*
*/
protected static function image_sizes() {

Expand Down
5 changes: 4 additions & 1 deletion inc/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function update( $key, $value ) {
/**
* Check if key is allowed.
*
* @param string $key Is key allowed or not.
* @param string $key Is key allowed or not.
*
* @return bool Is key allowed or not.
*/
Expand Down Expand Up @@ -294,6 +294,9 @@ public function get_cdn_url() {
if ( ! isset( $service_data['cdn_key'] ) ) {
return '';
}
if ( defined( 'OPTML_CUSTOM_DOMAIN' ) && constant( 'OPTML_CUSTOM_DOMAIN' ) ) {
return parse_url( strtolower( OPTML_CUSTOM_DOMAIN ), PHP_URL_HOST );
}

return sprintf(
'%s.%s',
Expand Down

0 comments on commit cedbb79

Please sign in to comment.