Skip to content

Commit 21a05de

Browse files
authored
Merge pull request #99 from wp-media/fix/wp-engine-empty-cdn-issue
Fix WPEngine CDN issue
2 parents c709017 + 803a550 commit 21a05de

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

inc/3rd-party/hosting/wpengine.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ function __rocket_run_rocket_bot_after_wpengine() {
3838
*/
3939
add_filter( 'get_rocket_option_cdn', '__rocket_auto_activate_cdn_on_wpengine' );
4040
function __rocket_auto_activate_cdn_on_wpengine( $value ) {
41-
4241
$cdn_domain = rocket_get_wp_engine_cdn_domain();
4342

4443
if ( ! empty( $cdn_domain ) ) {
@@ -50,7 +49,6 @@ function __rocket_auto_activate_cdn_on_wpengine( $value ) {
5049

5150
add_filter( 'rocket_cdn_cnames', '__rocket_add_wpengine_cdn_cnames' );
5251
function __rocket_add_wpengine_cdn_cnames( $hosts ) {
53-
5452
$cdn_domain = rocket_get_wp_engine_cdn_domain();
5553

5654
if ( ! empty( $cdn_domain ) ) {
@@ -119,7 +117,9 @@ function rocket_get_wp_engine_cdn_domain() {
119117
$wpengine = WpeCommon::instance();
120118
$cdn_domain = $wpengine->get_cdn_domain( $domains, home_url(), $is_ssl );
121119

122-
$cdn_domain = $native_schema . '://' . $cdn_domain;
120+
if ( ! empty( $cdn_domain ) ) {
121+
$cdn_domain = $native_schema . '://' . $cdn_domain;
122+
}
123123

124124
return $cdn_domain;
125125
}

wp-rocket.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: WP Rocket
44
Plugin URI: http://www.wp-rocket.me
55
Description: The best WordPress performance plugin.
6-
Version: 2.8.7
6+
Version: 2.8.8
77
Code Name: Ilum
88
Author: WP Rocket
99
Contributors: Jonathan Buttigieg, Julio Potier, Remy Perona
@@ -19,7 +19,7 @@
1919
defined( 'ABSPATH' ) or die( 'Cheatin’ uh?' );
2020

2121
// Rocket defines
22-
define( 'WP_ROCKET_VERSION' , '2.8.7' );
22+
define( 'WP_ROCKET_VERSION' , '2.8.8' );
2323
define( 'WP_ROCKET_PRIVATE_KEY' , false );
2424
define( 'WP_ROCKET_SLUG' , 'wp_rocket_settings' );
2525
define( 'WP_ROCKET_WEB_MAIN' , 'http://support.wp-rocket.me/' );

0 commit comments

Comments
 (0)