Skip to content

Commit

Permalink
Merge pull request #461 from wp-media/2.10.5
Browse files Browse the repository at this point in the history
2.10.5
  • Loading branch information
Screenfeed authored Jun 28, 2017
2 parents eda0ebf + 6ab6f6c commit 5a72dcf
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
10 changes: 6 additions & 4 deletions inc/front/process.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,24 @@
$host = urlencode( $host );

$continue = false;
if ( file_exists( realpath( $rocket_config_path . $host . '.php' ) ) && 0 === stripos( realpath( $rocket_config_path . $host . '.php' ), $rocket_config_path ) ) {
if ( realpath( $rocket_config_path . $host . '.php' ) && 0 === stripos( realpath( $rocket_config_path . $host . '.php' ), $rocket_config_path ) ) {
include( $rocket_config_path . $host . '.php' );
$continue = true;
} else {
$path = explode( '%2F' , trim( $_SERVER['REQUEST_URI'], '%2F' ) );
$path = str_replace( '\\', '/', strtok( $_SERVER['REQUEST_URI'], '?' ) );
$path = preg_replace( '|(?<=.)/+|', '/', $path );
$path = explode( '%2F' , trim( urlencode( $path ), '%2F' ) );

foreach ( $path as $p ) {
static $dir;

if ( file_exists( realpath( $rocket_config_path . $host . '.' . $p . '.php' ) ) && 0 === stripos( realpath( $rocket_config_path . $host . '.' . $p . '.php' ), $rocket_config_path ) ) {
if ( realpath( $rocket_config_path . $host . '.' . $p . '.php' ) && 0 === stripos( realpath( $rocket_config_path . $host . '.' . $p . '.php' ), $rocket_config_path ) ) {
include( $rocket_config_path . $host . '.' . $p . '.php' );
$continue = true;
break;
}

if ( file_exists( realpath( $rocket_config_path . $host . '.' . $dir . $p . '.php' ) ) && 0 === stripos( realpath( $rocket_config_path . $host . '.' . $dir . $p . '.php' ), $rocket_config_path ) ) {
if ( realpath( $rocket_config_path . $host . '.' . $dir . $p . '.php' ) && 0 === stripos( realpath( $rocket_config_path . $host . '.' . $dir . $p . '.php' ), $rocket_config_path ) ) {
include( $rocket_config_path . $host . '.' . $dir . $p . '.php' );
$continue = true;
break;
Expand Down
3 changes: 3 additions & 0 deletions inc/functions/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ function get_rocket_cache_reject_uri() {
// Exclude hide login plugins.
$uri = array_merge( $uri, get_rocket_logins_exclude_pages() );

// Exclude feeds
$uri[] = '(.*)/' . $GLOBALS['wp_rewrite']->feed_base . '/?';

/**
* Filter the rejected uri
*
Expand Down
7 changes: 6 additions & 1 deletion inc/functions/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,16 @@ function get_rocket_ecommerce_exclude_pages() {

// Easy Digital Downloads.
$edd_settings = get_option( 'edd_settings' );
if ( function_exists( 'EDD' ) && isset( $edd_settings['purchase_page'] ) ) {
if ( function_exists( 'EDD' ) && ! empty( $edd_settings['purchase_page'] ) ) {
$checkout_urls = get_rocket_i18n_translated_post_urls( $edd_settings['purchase_page'], 'page', '(.*)' );
$urls = array_merge( $urls, $checkout_urls );
}

if ( function_exists( 'EDD' ) && ! empty( $edd_settings['success_page'] ) ) {
$success_urls = get_rocket_i18n_translated_post_urls( $edd_settings['success_page'], 'page', '(.*)' );
$urls = array_merge( $urls, $success_urls );
}

// iThemes Exchange.
if ( function_exists( 'it_exchange_get_page_type' ) && function_exists( 'it_exchange_get_page_url' ) ) {
$pages = array(
Expand Down
6 changes: 3 additions & 3 deletions min/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
$wp_rocket_config_path = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/wp-rocket-config/';
$wp_rocket_config_file = realpath( $wp_rocket_config_path . $host . '.php' );

if ( file_exists( $wp_rocket_config_file ) && 0 === stripos( $wp_rocket_config_file, $wp_rocket_config_path ) && ! defined( 'ABSPATH' ) ) {
if ( $wp_rocket_config_file && 0 === stripos( $wp_rocket_config_file, $wp_rocket_config_path ) && ! defined( 'ABSPATH' ) ) {
// Create fake ABSPATH
define( 'ABSPATH', null );

Expand Down Expand Up @@ -142,9 +142,9 @@
* To use Google's Closure Compiler API to minify Javascript (falling back to JSMin
* on failure), uncomment the following line:
*/
if ( isset( $rocket_minify_js_legacy ) && '0' === $rocket_minify_js_legacy ) {
/*if ( isset( $rocket_minify_js_legacy ) && '0' === $rocket_minify_js_legacy ) {
$min_serveOptions['minifiers']['application/x-javascript'] = array('Minify_JS_ClosureCompiler', 'minify');
}
}*/

/**
* If you'd like to restrict the "f" option to files within/below
Expand Down
6 changes: 3 additions & 3 deletions wp-rocket.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WP Rocket
* Plugin URI: https://wp-rocket.me
* Description: The best WordPress performance plugin.
* Version: 2.10.4
* Version: 2.10.5
* Code Name: Endor
* Author: WP Media
* Contributors: Jonathan Buttigieg, Julio Potier, Remy Perona
Expand All @@ -13,13 +13,13 @@
* Text Domain: rocket
* Domain Path: languages
*
* Copyright 2013-2016 WP Rocket
* Copyright 2013-2017 WP Rocket
* */

defined( 'ABSPATH' ) or die( 'Cheatin&#8217; uh?' );

// Rocket defines.
define( 'WP_ROCKET_VERSION' , '2.10.4' );
define( 'WP_ROCKET_VERSION' , '2.10.5' );
define( 'WP_ROCKET_PRIVATE_KEY' , false );
define( 'WP_ROCKET_SLUG' , 'wp_rocket_settings' );
define( 'WP_ROCKET_WEB_MAIN' , false );
Expand Down

0 comments on commit 5a72dcf

Please sign in to comment.