1.8.2
This commit is contained in:
parent
6f19008509
commit
42bc1771fa
7 changed files with 226 additions and 12 deletions
|
@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
||||||
Tags: cache, page cache, full page cache, nginx, memcached, apc, speed
|
Tags: cache, page cache, full page cache, nginx, memcached, apc, speed
|
||||||
Requires at least: 3.0
|
Requires at least: 3.0
|
||||||
Tested up to: 4.2.1
|
Tested up to: 4.2.1
|
||||||
Stable tag: 1.8.1
|
Stable tag: 1.8.2
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
@ -125,6 +125,13 @@ Version numbering logic:
|
||||||
* every .B version indicates new features.
|
* every .B version indicates new features.
|
||||||
* every ..C indicates bugfixes for A.B version.
|
* every ..C indicates bugfixes for A.B version.
|
||||||
|
|
||||||
|
= 1.8.2 =
|
||||||
|
*2015-04-30*
|
||||||
|
|
||||||
|
* sha1 key hashing made to be optional
|
||||||
|
* added additional debug condition of WP_FFPC__DEBUG_MODE constant to be `true`
|
||||||
|
|
||||||
|
|
||||||
= 1.8.1 =
|
= 1.8.1 =
|
||||||
*2015-04-29*
|
*2015-04-29*
|
||||||
|
|
||||||
|
|
194
wp-admin.css
Normal file
194
wp-admin.css
Normal file
|
@ -0,0 +1,194 @@
|
||||||
|
.plugin-admin dt {
|
||||||
|
margin-top: 2em;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plugin-admin fieldset {
|
||||||
|
display:block;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 1em 0 1em;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plugin-admin legend {
|
||||||
|
display: none;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plugin-admin .description {
|
||||||
|
display: block;
|
||||||
|
padding-top: 0.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plugin-admin .tabs {
|
||||||
|
padding:0;
|
||||||
|
margin: 0;
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plugin-admin .tabs li {
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 1px 1px 1px 1px;
|
||||||
|
border-color: #ccc;
|
||||||
|
border-bottom-color: #ccc;
|
||||||
|
line-height: 120%;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0.5em 2em 0.5em 2em;
|
||||||
|
text-decoration: none;
|
||||||
|
margin-bottom: -1px;
|
||||||
|
-webkit-border-top-left-radius: 3px;
|
||||||
|
-webkit-border-top-right-radius: 3px;
|
||||||
|
border-top-left-radius: 3px;
|
||||||
|
border-top-right-radius: 3px;
|
||||||
|
background: #f1f1f1;
|
||||||
|
background-image: -webkit-gradient(linear,left bottom,left top,from(#ececec),to(#f9f9f9));
|
||||||
|
background-image: -webkit-linear-gradient(bottom,#ececec,#f9f9f9);
|
||||||
|
background-image: -moz-linear-gradient(bottom,#ececec,#f9f9f9);
|
||||||
|
background-image: -o-linear-gradient(bottom,#ececec,#f9f9f9);
|
||||||
|
background-image: linear-gradient(to top,#ececec,#f9f9f9);
|
||||||
|
}
|
||||||
|
|
||||||
|
.plugin-admin .tabs li a {
|
||||||
|
outline: none;
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 120%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plugin-admin .tabs li.ui-state-active {
|
||||||
|
background: #fff;
|
||||||
|
border-bottom-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error p {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-msg {
|
||||||
|
color: #990000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ok-msg {
|
||||||
|
color: #009900;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear {
|
||||||
|
clear:both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wp-ffpc-donation {
|
||||||
|
padding: 0.8em;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
-webkit-border-radius: 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.wp-ffpc-donation * {
|
||||||
|
display: inline;
|
||||||
|
line-height: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wp-ffpc-donation .currency {
|
||||||
|
padding: 0 0 0 0.3em;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.wp-ffpc-donation .submit {
|
||||||
|
display: inline-block;
|
||||||
|
width: 74px;
|
||||||
|
height: 21px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wp-ffpc-donation .ui-slider {
|
||||||
|
position: relative;
|
||||||
|
text-align: left;
|
||||||
|
display: inline-block;
|
||||||
|
width: 16em;
|
||||||
|
margin: 0 2em 0 2em;
|
||||||
|
height: 0.4em;
|
||||||
|
background-color: #111;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
-webkit-border-radius: 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: #f1f1f1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wp-ffpc-donation .ui-slider .ui-slider-handle {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2;
|
||||||
|
width: 1.2em;
|
||||||
|
height: 1.2em;
|
||||||
|
margin-top: -0.4em;
|
||||||
|
cursor: default;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
-webkit-border-radius: 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: #f1f1f1;
|
||||||
|
background-image: -webkit-gradient(linear,left bottom,left top,from(#ececec),to(#f9f9f9));
|
||||||
|
background-image: -webkit-linear-gradient(bottom,#ececec,#f9f9f9);
|
||||||
|
background-image: -moz-linear-gradient(bottom,#ececec,#f9f9f9);
|
||||||
|
background-image: -o-linear-gradient(bottom,#ececec,#f9f9f9);
|
||||||
|
background-image: linear-gradient(to top,#ececec,#f9f9f9);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.button-warning {
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 23px;
|
||||||
|
height: 24px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 10px 1px;
|
||||||
|
cursor: pointer;
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
-webkit-border-radius: 3px;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
border-radius: 3px;
|
||||||
|
white-space: nowrap;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: #f3f3f3;
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#f4f4f4));
|
||||||
|
background-image: -webkit-linear-gradient(top, #fefefe, #f4f4f4);
|
||||||
|
background-image: -moz-linear-gradient(top, #fefefe, #f4f4f4);
|
||||||
|
background-image: -o-linear-gradient(top, #fefefe, #f4f4f4);
|
||||||
|
background-image: linear-gradient(to bottom, #fefefe, #f4f4f4);
|
||||||
|
border-color: #bbb;
|
||||||
|
color: #900;
|
||||||
|
text-shadow: 0 1px 0 #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-warning:hover,
|
||||||
|
.button-warning:focus {
|
||||||
|
background: #f3f3f3;
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f3f3f3));
|
||||||
|
background-image: -webkit-linear-gradient(top, #fff, #f3f3f3);
|
||||||
|
background-image: -moz-linear-gradient(top, #fff, #f3f3f3);
|
||||||
|
background-image: -ms-linear-gradient(top, #fff, #f3f3f3);
|
||||||
|
background-image: -o-linear-gradient(top, #fff, #f3f3f3);
|
||||||
|
background-image: linear-gradient(to bottom, #fff, #f3f3f3);
|
||||||
|
border-color: #900;
|
||||||
|
color: #a00;
|
||||||
|
-webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2);
|
||||||
|
box-shadow: 1px 1px 1px rgba(0,0,0,.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-warning:active {
|
||||||
|
background: #eee;
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#fefefe));
|
||||||
|
background-image: -webkit-linear-gradient(top, #f4f4f4, #fefefe);
|
||||||
|
background-image: -moz-linear-gradient(top, #f4f4f4, #fefefe);
|
||||||
|
background-image: -ms-linear-gradient(top, #f4f4f4, #fefefe);
|
||||||
|
background-image: -o-linear-gradient(top, #f4f4f4, #fefefe);
|
||||||
|
background-image: linear-gradient(to bottom, #f4f4f4, #fefefe);
|
||||||
|
border-color: #900;
|
||||||
|
color: #a00;
|
||||||
|
text-shadow: 0 -1px 0 #fff;
|
||||||
|
-webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
|
||||||
|
box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
|
||||||
|
}
|
|
@ -563,7 +563,7 @@ abstract class WP_FFPC_ABSTRACT {
|
||||||
wp_die( '<h1>Error:</h1>' . '<p>' . $message . '</p>' );
|
wp_die( '<h1>Error:</h1>' . '<p>' . $message . '</p>' );
|
||||||
exit;
|
exit;
|
||||||
default:
|
default:
|
||||||
if ( !defined( 'WP_DEBUG' ) && WP_DEBUG != true )
|
if ( !defined( 'WP_DEBUG' ) || WP_DEBUG != true || !defined( 'WP_FFPC__DEBUG_MODE' ) || WP_FFPC__DEBUG_MODE != true )
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,7 +140,10 @@ class WP_FFPC_Backend {
|
||||||
|
|
||||||
$key_base = self::map_urimap($urimap, $this->options['key']);
|
$key_base = self::map_urimap($urimap, $this->options['key']);
|
||||||
/* data is string only with content, meta is not used in nginx */
|
/* data is string only with content, meta is not used in nginx */
|
||||||
$key = sha1 ($prefix . $key_base );
|
$key = $prefix . $key_base;
|
||||||
|
if ( isset($this->options['hashkey']) && $this->options['hashkey'] == true)
|
||||||
|
$key = sha1 ($prefix . $key_base );
|
||||||
|
|
||||||
$this->log ( sprintf( __translate__( 'original key configuration: %s', $this->plugin_constant ), $this->options['key'] ) );
|
$this->log ( sprintf( __translate__( 'original key configuration: %s', $this->plugin_constant ), $this->options['key'] ) );
|
||||||
$this->log ( sprintf( __translate__( 'setting key for: %s', $this->plugin_constant ), $key_base ) );
|
$this->log ( sprintf( __translate__( 'setting key for: %s', $this->plugin_constant ), $key_base ) );
|
||||||
$this->log ( sprintf( __translate__( 'setting key to: %s', $this->plugin_constant ), $key ) );
|
$this->log ( sprintf( __translate__( 'setting key to: %s', $this->plugin_constant ), $key ) );
|
||||||
|
@ -502,7 +505,7 @@ class WP_FFPC_Backend {
|
||||||
wp_die( '<h1>Error:</h1>' . '<p>' . $message . '</p>' );
|
wp_die( '<h1>Error:</h1>' . '<p>' . $message . '</p>' );
|
||||||
exit;
|
exit;
|
||||||
default:
|
default:
|
||||||
if ( !defined( 'WP_DEBUG' ) && WP_DEBUG != true )
|
if ( !defined( 'WP_DEBUG' ) || WP_DEBUG != true || !defined( 'WP_FFPC__DEBUG_MODE' ) || WP_FFPC__DEBUG_MODE != true )
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,11 +70,8 @@ class WP_FFPC extends WP_FFPC_ABSTRACT {
|
||||||
$this->plugin_url = plugin_dir_url( __FILE__ );
|
$this->plugin_url = plugin_dir_url( __FILE__ );
|
||||||
$this->plugin_dir = plugin_dir_path( __FILE__ );
|
$this->plugin_dir = plugin_dir_path( __FILE__ );
|
||||||
|
|
||||||
$this->common_url = $this->plugin_url . self::common_slug;
|
|
||||||
$this->common_dir = $this->plugin_dir . self::common_slug;
|
|
||||||
|
|
||||||
$this->admin_css_handle = $this->plugin_constant . '-admin-css';
|
$this->admin_css_handle = $this->plugin_constant . '-admin-css';
|
||||||
$this->admin_css_url = $this->common_url . 'wp-admin.css';
|
$this->admin_css_url = $this->plugin_url . 'wp-admin.css';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -574,13 +571,23 @@ class WP_FFPC extends WP_FFPC_ABSTRACT {
|
||||||
?></dl>
|
?></dl>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
<dt>
|
||||||
|
<label for="hashkey"><?php _e('SHA1 hash key', $this->plugin_constant); ?></label>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<input type="checkbox" name="hashkey" id="hashkey" value="1" <?php checked($this->options['hashkey'],true); ?> />
|
||||||
|
<span class="description"><?php _e('Occasionally URL can be too long to be used as key for the backend storage, especially with memcached. Turn on this feature to use SHA1 hash of the URL as key instead. Please be aware that you have to add ( or uncomment ) a line in nginx if you want nginx to fetch the data directly; for details, please see the nginx example tab.', $this->plugin_constant); ?>
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset id="<?php echo $this->plugin_constant ?>-debug">
|
<fieldset id="<?php echo $this->plugin_constant ?>-debug">
|
||||||
<legend><?php _e( 'Debug & in-depth settings', $this->plugin_constant ); ?></legend>
|
<legend><?php _e( 'Debug & in-depth settings', $this->plugin_constant ); ?></legend>
|
||||||
<h3><?php _e('Notes', $this->plugin_constant);?></h3>
|
<h3><?php _e('Notes', $this->plugin_constant);?></h3>
|
||||||
<p><?php _e('The former method of debug logging flag has been removed. In case you need debug log from WP-FFPC please set the <a href="http://codex.wordpress.org/WP_DEBUG">WP_DEBUG</a> constant `true`.<br /> This will enable NOTICE level messages apart from the WARNING level ones which are always displayed.', $this->plugin_constant); ?></p>
|
<p><?php _e('The former method of debug logging flag has been removed. In case you need debug log from WP-FFPC please set both the <a href="http://codex.wordpress.org/WP_DEBUG">WP_DEBUG</a> and the WP_FFPC__DEBUG_MODE constants `true` in wp-config.php.<br /> This will enable NOTICE level messages apart from the WARNING level ones which are always displayed.', $this->plugin_constant); ?></p>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
|
|
|
@ -71,7 +71,9 @@ MEMCACHED_SERVERS
|
||||||
|
|
||||||
default_type text/html;
|
default_type text/html;
|
||||||
set $memcached_raw_key data-$scheme://$host$request_uri;
|
set $memcached_raw_key data-$scheme://$host$request_uri;
|
||||||
set_sha1 $memcached_key $memcached_raw_key;
|
# uncomment the following line if you have enabled
|
||||||
|
# sha1 hash option
|
||||||
|
# set_sha1 $memcached_key $memcached_raw_key;
|
||||||
set $memcached_request 1;
|
set $memcached_request 1;
|
||||||
|
|
||||||
if ($request_method = POST ) {
|
if ($request_method = POST ) {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
Plugin Name: WP-FFPC
|
Plugin Name: WP-FFPC
|
||||||
Plugin URI: https://github.com/petermolnar/wp-ffpc
|
Plugin URI: https://github.com/petermolnar/wp-ffpc
|
||||||
Description: WordPress in-memory full page cache plugin
|
Description: WordPress in-memory full page cache plugin
|
||||||
Version: 1.8.1
|
Version: 1.8.2
|
||||||
Author: Peter Molnar <hello@petermolnar.eu>
|
Author: Peter Molnar <hello@petermolnar.eu>
|
||||||
Author URI: http://petermolnar.eu/
|
Author URI: http://petermolnar.eu/
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
|
@ -56,6 +56,7 @@ $wp_ffpc_defaults = array (
|
||||||
'key' => '$scheme://$host$request_uri',
|
'key' => '$scheme://$host$request_uri',
|
||||||
'comments_invalidate' => true,
|
'comments_invalidate' => true,
|
||||||
'pingback_header' => false,
|
'pingback_header' => false,
|
||||||
|
'hashkey' => false,
|
||||||
);
|
);
|
||||||
|
|
||||||
$wp_ffpc = new WP_FFPC ( 'wp-ffpc', '1.7.9', 'WP-FFPC', $wp_ffpc_defaults, 'PeterMolnar_WordPressPlugins_wp-ffpc_HU' , 'WP-FFPC' , 'FA3NT7XDVHPWU' );
|
$wp_ffpc = new WP_FFPC ( 'wp-ffpc', '1.8.2', 'WP-FFPC', $wp_ffpc_defaults, 'PeterMolnar_WordPressPlugins_wp-ffpc_HU' , 'WP-FFPC' , 'FA3NT7XDVHPWU' );
|
||||||
|
|
Loading…
Reference in a new issue