Changeset 2505413
- Timestamp:
- 03/29/2021 05:12:12 PM (5 years ago)
- Location:
- cachify
- Files:
-
- 18 added
- 16 deleted
- 31 edited
- 1 copied
-
assets/banner-1544x500.png (modified) (1 prop) (previous)
-
assets/banner-772x250.png (modified) (1 prop) (previous)
-
assets/icon-128x128.png (modified) (1 prop) (previous)
-
assets/icon-256x256.png (modified) (1 prop) (previous)
-
assets/screenshot-1.png (modified) (1 prop) (previous)
-
assets/screenshot-2.png (modified) (1 prop) (previous)
-
assets/screenshot-3.png (modified) (1 prop) (previous)
-
tags/2.3.1 (copied) (copied from cachify/trunk)
-
tags/2.3.1/CHANGELOG.md (modified) (1 diff)
-
tags/2.3.1/README.md (deleted)
-
tags/2.3.1/apc/proxy.php (modified) (3 diffs)
-
tags/2.3.1/cachify.php (modified) (3 diffs)
-
tags/2.3.1/css/dashboard.css (modified) (2 diffs)
-
tags/2.3.1/css/settings.css (modified) (2 diffs)
-
tags/2.3.1/docker_tag (added)
-
tags/2.3.1/inc/cachify.class.php (deleted)
-
tags/2.3.1/inc/cachify.settings-footer.php (added)
-
tags/2.3.1/inc/cachify.settings.php (modified) (8 diffs)
-
tags/2.3.1/inc/cachify.settings_footer.php (deleted)
-
tags/2.3.1/inc/cachify_apc.class.php (deleted)
-
tags/2.3.1/inc/cachify_cli.class.php (deleted)
-
tags/2.3.1/inc/cachify_db.class.php (deleted)
-
tags/2.3.1/inc/cachify_hdd.class.php (deleted)
-
tags/2.3.1/inc/cachify_memcached.class.php (deleted)
-
tags/2.3.1/inc/class-cachify-apc.php (added)
-
tags/2.3.1/inc/class-cachify-cli.php (added)
-
tags/2.3.1/inc/class-cachify-db.php (added)
-
tags/2.3.1/inc/class-cachify-hdd.php (added)
-
tags/2.3.1/inc/class-cachify-memcached.php (added)
-
tags/2.3.1/inc/class-cachify.php (added)
-
tags/2.3.1/inc/setup/cachify.apc.htaccess.php (modified) (2 diffs)
-
tags/2.3.1/inc/setup/cachify.apc.nginx.php (modified) (2 diffs)
-
tags/2.3.1/inc/setup/cachify.hdd.htaccess.php (modified) (2 diffs)
-
tags/2.3.1/inc/setup/cachify.hdd.nginx.php (modified) (3 diffs)
-
tags/2.3.1/inc/setup/cachify.memcached.nginx.php (modified) (3 diffs)
-
tags/2.3.1/output.log (added)
-
tags/2.3.1/readme.txt (modified) (7 diffs)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/README.md (deleted)
-
trunk/apc/proxy.php (modified) (3 diffs)
-
trunk/cachify.php (modified) (3 diffs)
-
trunk/css/dashboard.css (modified) (2 diffs)
-
trunk/css/settings.css (modified) (2 diffs)
-
trunk/docker_tag (added)
-
trunk/inc/cachify.class.php (deleted)
-
trunk/inc/cachify.settings-footer.php (added)
-
trunk/inc/cachify.settings.php (modified) (8 diffs)
-
trunk/inc/cachify.settings_footer.php (deleted)
-
trunk/inc/cachify_apc.class.php (deleted)
-
trunk/inc/cachify_cli.class.php (deleted)
-
trunk/inc/cachify_db.class.php (deleted)
-
trunk/inc/cachify_hdd.class.php (deleted)
-
trunk/inc/cachify_memcached.class.php (deleted)
-
trunk/inc/class-cachify-apc.php (added)
-
trunk/inc/class-cachify-cli.php (added)
-
trunk/inc/class-cachify-db.php (added)
-
trunk/inc/class-cachify-hdd.php (added)
-
trunk/inc/class-cachify-memcached.php (added)
-
trunk/inc/class-cachify.php (added)
-
trunk/inc/setup/cachify.apc.htaccess.php (modified) (2 diffs)
-
trunk/inc/setup/cachify.apc.nginx.php (modified) (2 diffs)
-
trunk/inc/setup/cachify.hdd.htaccess.php (modified) (2 diffs)
-
trunk/inc/setup/cachify.hdd.nginx.php (modified) (3 diffs)
-
trunk/inc/setup/cachify.memcached.nginx.php (modified) (3 diffs)
-
trunk/output.log (added)
-
trunk/readme.txt (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cachify/assets/banner-1544x500.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
cachify/assets/banner-772x250.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
cachify/assets/icon-128x128.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
cachify/assets/icon-256x256.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
cachify/assets/screenshot-1.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
cachify/assets/screenshot-2.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
cachify/assets/screenshot-3.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
cachify/tags/2.3.1/CHANGELOG.md
r2283367 r2505413 2 2 All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). 3 3 4 ## [2.3.0] 5 * New: WP-CLI integration, see #165, props derweili 4 ## 2.3.1 5 * Fix: clean up unused parameter evaluation after publishing a post to prevent PHP notice (#187) (#188) 6 * Fix: correct minor spelling mistakes (#193, props timse201) 7 * Fix: update support links (#194, props timse201) 8 9 ## 2.3.0 10 * New: WP-CLI integration (#165, props derweili) 6 11 * New: `cachify_flush_cache_hooks` filter added to modify all hooks that flush the cache 7 12 * New: Flush cache when a user is created / updated / deleted 8 * New: Flush cache when a term is created / updated / deleted , see #169, props derweili9 * New: Cache behavior after post modification is now configurable in plugin settings 10 * Enhance: Cache exceptions/User-Agents translation , see #52, props timse20111 * Enhance: Readme FAQ , see #51, props timse20112 * Enhance: sizeable exclusion boxes + placeholder , see #53, props timse20113 * Enhance: FAQ and Support links , see #55, props timse20113 * New: Flush cache when a term is created / updated / deleted (#169, props derweili) 14 * New: Cache behavior after post modification is now configurable in plugin settings (#176) 15 * Enhance: Cache exceptions/User-Agents translation (#52, props timse201) 16 * Enhance: Readme FAQ (#51, props timse201) 17 * Enhance: sizeable exclusion boxes + placeholder (#53, props timse201) 18 * Enhance: FAQ and Support links (#55, props timse201) 14 19 * Enhance: Add text caption to "flush cache" button 15 * Security: Tabnabbing prevention, see #55, props timse201 20 * Enhance: Icon font converted to SVG (#64) 21 * Enhance: Improved HDD cache invalidation for hierarchical post types (#71, props Syberspace) 22 * Enhance: Unified and shortened HTML signature across all caching methods (#108) (#109) 23 * Security: Tabnabbing prevention (#55, props timse201) 24 * Maintenance: Tested up to WordPress 5.4 25 16 26 17 27 ## 2.2.4 -
cachify/tags/2.3.1/apc/proxy.php
r2283367 r2505413 1 1 <?php 2 /** 3 * Proxy for APC based caching. 4 * 5 * @package Cachify 6 */ 2 7 3 8 if ( ! empty( $_COOKIE ) ) { … … 19 24 function cachify_is_ssl() { 20 25 if ( isset( $_SERVER['HTTPS'] ) ) { 21 if ( 'on' === strtolower( $_SERVER['HTTPS'] ) ) { 26 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 27 if ( 'on' === strtolower( wp_unslash( $_SERVER['HTTPS'] ) ) ) { 22 28 return true; 23 29 } … … 35 41 if ( 36 42 empty( $_cachify_logged_in ) 43 && extension_loaded( 'apc' ) 37 44 && ( strpos( filter_input( INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_STRING ), '/wp-admin/' ) === false ) 38 45 && ( strpos( filter_input( INPUT_SERVER, 'HTTP_ACCEPT_ENCODING', FILTER_SANITIZE_STRING ), 'gzip' ) !== false ) 39 && extension_loaded( 'apc' )40 && ( $cache = apc_fetch( md5( ( cachify_is_ssl() ? 'https-' : '' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ) . '.cachify' ) )41 46 ) { 42 ini_set( 'zlib.output_compression', 'Off' ); 47 $prefix = cachify_is_ssl() ? 'https-' : ''; 48 $cache = apc_fetch( 49 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.InputNotValidated 50 md5( $prefix . wp_unslash( $_SERVER['HTTP_HOST'] ) . wp_unslash( $_SERVER['REQUEST_URI'] ) ) 51 . '.cachify' 52 ); 53 if ( $cache ) { 54 ini_set( 'zlib.output_compression', 'Off' ); 43 55 44 header( 'Vary: Accept-Encoding' );45 header( 'X-Powered-By: Cachify' );46 header( 'Content-Encoding: gzip' );47 header( 'Content-Length: ' . strlen( $cache ) );48 header( 'Content-Type: text/html; charset=utf-8' );56 header( 'Vary: Accept-Encoding' ); 57 header( 'X-Powered-By: Cachify' ); 58 header( 'Content-Encoding: gzip' ); 59 header( 'Content-Length: ' . strlen( $cache ) ); 60 header( 'Content-Type: text/html; charset=utf-8' ); 49 61 50 echo $cache; 51 exit; 62 echo $cache; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 63 exit; 64 } 52 65 } -
cachify/tags/2.3.1/cachify.php
r2283367 r2505413 1 1 <?php 2 /* 3 Plugin Name: Cachify 4 Description: Easy to use WordPress caching plugin. Serving static blog pages from database, disk, Memcached or APC. 5 Author: pluginkollektiv 6 Author URI: https://pluginkollektiv.org 7 Plugin URI: https://cachify.pluginkollektiv.org/ 8 License: GPLv2 or later 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 Version: 2.3.0 11 Text Domain: cachify 12 Domain Path: /lang 13 */ 2 /** 3 * Plugin Name: Cachify 4 * Description: Easy to use WordPress caching plugin. Serving static blog pages from database, disk, Memcached or APC. 5 * Author: pluginkollektiv 6 * Author URI: https://pluginkollektiv.org 7 * Plugin URI: https://cachify.pluginkollektiv.org 8 * License: GPLv2 or later 9 * License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 * Version: 2.3.1 11 * Text Domain: cachify 12 * 13 * @package Cachify 14 */ 14 15 15 16 /* … … 75 76 /* WP-CLI */ 76 77 add_action( 77 'cli_init',78 array(79 'Cachify_CLI',80 'add_commands' 81 )78 'cli_init', 79 array( 80 'Cachify_CLI', 81 'add_commands', 82 ) 82 83 ); 83 84 … … 85 86 spl_autoload_register( 'cachify_autoload' ); 86 87 87 /* Autoload function */ 88 /** 89 * Autoload the class. 90 * 91 * @param string $class the class name. 92 */ 88 93 function cachify_autoload( $class ) { 89 94 if ( in_array( $class, array( 'Cachify', 'Cachify_APC', 'Cachify_DB', 'Cachify_HDD', 'Cachify_MEMCACHED', 'Cachify_CLI' ) ) ) { 90 95 require_once( 91 96 sprintf( 92 '%s/inc/ %s.class.php',97 '%s/inc/class-%s.php', 93 98 CACHIFY_DIR, 94 strtolower( $class)99 strtolower( str_replace( '_', '-', $class ) ) 95 100 ) 96 101 ); -
cachify/tags/2.3.1/css/dashboard.css
r2283367 r2505413 1 1 /* @group Dashboard */ 2 #dashboard_right_now .cachify-icon {2 #dashboard_right_now .cachify-icon { 3 3 width: 19px; 4 4 height: 13px; … … 6 6 } 7 7 8 #dashboard_right_now li a.cachify-glance::before {8 #dashboard_right_now li a.cachify-glance::before { 9 9 content: ""; 10 10 padding: 0; -
cachify/tags/2.3.1/css/settings.css
r2283367 r2505413 1 1 .wp-core-ui .button-flush { 2 background: #dd823b;3 border-color: #c36922 #ad5d1e #ad5d1e;4 color: #fff;5 box-shadow: 0 1px 0 #ad5d1e;6 text-shadow: 0 -1px 1px #ad5d1e,1px 0 1px #ad5d1e,0 1px 1px #ad5d1e,-1px 0 1px #ad5d1e 2 background: #dd823b; 3 border-color: #c36922 #ad5d1e #ad5d1e; 4 color: #fff; 5 box-shadow: 0 1px 0 #ad5d1e; 6 text-shadow: 0 -1px 1px #ad5d1e, 1px 0 1px #ad5d1e, 0 1px 1px #ad5d1e, -1px 0 1px #ad5d1e; 7 7 } 8 8 9 9 .wp-core-ui .button-flush:focus, 10 10 .wp-core-ui .button-flush:hover { 11 background: #df8a48;12 border-color: #ad5d1e;13 color: #fff;14 box-shadow: 0 1px 0 #ad5d1e 11 background: #df8a48; 12 border-color: #ad5d1e; 13 color: #fff; 14 box-shadow: 0 1px 0 #ad5d1e; 15 15 } 16 16 17 17 .wp-core-ui .button-flush:focus { 18 box-shadow: inset 0 1px 0 #c36922,0 0 2px 1px #33b3db 18 box-shadow: inset 0 1px 0 #c36922, 0 0 2px 1px #33b3db; 19 19 } 20 20 … … 23 23 .wp-core-ui .button-flush.active:hover, 24 24 .wp-core-ui .button-flush:active { 25 background: #c36922;26 border-color: #ad5d1e;27 box-shadow: inset 0 2px 0 #ad5d1e 25 background: #c36922; 26 border-color: #ad5d1e; 27 box-shadow: inset 0 2px 0 #ad5d1e; 28 28 } -
cachify/tags/2.3.1/inc/cachify.settings.php
r2283367 r2505413 1 1 <?php 2 /** 3 * Settings page. 4 * 5 * @package Cachify 6 */ 7 2 8 /* Quit */ 3 9 defined( 'ABSPATH' ) || exit; … … 5 11 6 12 <form method="post" action="options.php"> 7 <?php settings_fields( 'cachify' ) ?>13 <?php settings_fields( 'cachify' ); ?> 8 14 <table class="form-table"> 9 15 <tr> … … 14 20 <select name="cachify[use_apc]" id="cachify_cache_method"> 15 21 <?php foreach ( self::_method_select() as $k => $v ) { ?> 16 <option value="<?php echo esc_attr( $k ) ?>" <?php selected( $options['use_apc'], $k ); ?>><?php echo esc_html( $v )?></option>22 <option value="<?php echo esc_attr( $k ); ?>" <?php selected( $options['use_apc'], $k ); ?>><?php echo esc_html( $v ); ?></option> 17 23 <?php } ?> 18 24 </select> … … 22 28 <tr> 23 29 <th scope="row"> 24 <label for="cachify_cache_expires"><?php esc_html_e( 'Cache expiration', 'cachify' ) ?></label>30 <label for="cachify_cache_expires"><?php esc_html_e( 'Cache expiration', 'cachify' ); ?></label> 25 31 </th> 26 32 <td> 27 33 <?php if ( self::METHOD_HDD === $options['use_apc'] ) : ?> 28 <input type="number" min="0" step="1" name="cachify[cache_expires]" id="cachify_cache_expires" value="" disabled="disabled" class="small-text" /> Hours 34 <input type="number" min="0" step="1" name="cachify[cache_expires]" id="cachify_cache_expires" value="" disabled="disabled" class="small-text" /> 35 <?php esc_html_e( 'Hours', 'cachify' ); ?> 29 36 <p class="description"><?php esc_html_e( 'HDD cache will only expire as you update posts or flush it yourself.', 'cachify' ); ?></p> 30 37 <?php else : ?> 31 <input type="number" min="0" step="1" name="cachify[cache_expires]" id="cachify_cache_expires" value="<?php echo esc_attr( $options['cache_expires'] ) ?>" class="small-text" />38 <input type="number" min="0" step="1" name="cachify[cache_expires]" id="cachify_cache_expires" value="<?php echo esc_attr( $options['cache_expires'] ); ?>" class="small-text" /> 32 39 <?php esc_html_e( 'Hours', 'cachify' ); ?> 33 40 <?php endif; ?> 34 41 35 42 <p class="description"> 36 <?php printf( 43 <?php 44 printf( 37 45 /* translators: Placeholder is the trash icon itself as dashicon */ 38 46 esc_html__( 'Flush the cache by clicking the button below or the %1$s icon in the admin bar.', 'cachify' ), 39 47 '<span class="dashicons dashicons-trash" aria-hidden="true"></span><span class="screen-reader-text">"' . esc_html__( 'Flush the cachify cache', 'cachify' ) . '"</span>' 40 ); ?> 48 ); 49 ?> 41 50 </p> 42 51 43 <p><a class="button button-flush" href="<?php echo wp_nonce_url( add_query_arg( '_cachify', 'flush' ), '_cachify__flush_nonce' ); ?>"><?php esc_html_e( 'Flush cache now', 'cachify' ) ?></a></p> 52 <?php 53 $flush_cache_url = wp_nonce_url( add_query_arg( '_cachify', 'flush' ), '_cachify__flush_nonce' ); 54 ?> 55 56 <p> 57 <a class="button button-flush" href="<?php echo esc_url( $flush_cache_url ); ?>"> 58 <?php esc_html_e( 'Flush cache now', 'cachify' ); ?> 59 </a> 60 </p> 44 61 </td> 45 62 </tr> … … 86 103 <fieldset> 87 104 <label for="cachify_without_ids"> 88 <input type="text" name="cachify[without_ids]" id="cachify_without_ids" placeholder="<?php esc_attr_e( 'e.g. 1, 2, 3', 'cachify' ); ?>" value="<?php echo esc_attr( $options['without_ids'] ) ?>" />89 <?php esc_html_e( 'Post/Page s-IDs', 'cachify' ); ?>105 <input type="text" name="cachify[without_ids]" id="cachify_without_ids" placeholder="<?php esc_attr_e( 'e.g. 1, 2, 3', 'cachify' ); ?>" value="<?php echo esc_attr( $options['without_ids'] ); ?>" /> 106 <?php esc_html_e( 'Post/Page IDs', 'cachify' ); ?> 90 107 </label> 91 108 … … 93 110 94 111 <label for="cachify_without_agents"> 95 <input type="text" name="cachify[without_agents]" id="cachify_without_agents" placeholder="<?php esc_attr_e( 'e.g. MSIE 6, Opera', 'cachify' ); ?>" value="<?php echo esc_attr( $options['without_agents'] ) ?>" />96 <?php esc_html_e( 'Browser User -Agents', 'cachify' ); ?>112 <input type="text" name="cachify[without_agents]" id="cachify_without_agents" placeholder="<?php esc_attr_e( 'e.g. MSIE 6, Opera', 'cachify' ); ?>" value="<?php echo esc_attr( $options['without_agents'] ); ?>" /> 113 <?php esc_html_e( 'Browser User Agents', 'cachify' ); ?> 97 114 </label> 98 115 </fieldset> … … 107 124 <select name="cachify[compress_html]" id="cachify_compress_html"> 108 125 <?php foreach ( self::_minify_select() as $k => $v ) { ?> 109 <option value="<?php echo esc_attr( $k ) ?>" <?php selected( $options['compress_html'], $k ); ?>>110 <?php echo esc_html( $v ) ?>126 <option value="<?php echo esc_attr( $k ); ?>" <?php selected( $options['compress_html'], $k ); ?>> 127 <?php echo esc_html( $v ); ?> 111 128 </option> 112 129 <?php } ?> … … 126 143 </table> 127 144 128 <?php submit_button() ?>145 <?php submit_button(); ?> 129 146 </form> -
cachify/tags/2.3.1/inc/setup/cachify.apc.htaccess.php
r2283367 r2505413 1 1 <?php 2 /** 3 * Setup for APC on Apache server. 4 * 5 * @package Cachify 6 */ 7 2 8 /* Quit */ 3 9 defined( 'ABSPATH' ) || exit; … … 25 31 26 32 <div style="background:#fff;border:1px solid #ccc;padding:10px 20px"> 27 <pre style="white-space: pre-wrap"><?php echo sprintf( '%s%s%s', 28 $beginning, 29 WP_PLUGIN_DIR, 30 $ending ); ?></pre> 33 <pre style="white-space: pre-wrap"> 34 <?php 35 echo sprintf( 36 '%s%s%s', 37 esc_html( $beginning ), 38 esc_html( WP_PLUGIN_DIR ), 39 esc_html( $ending ) 40 ); 41 ?> 42 </pre> 31 43 </div> -
cachify/tags/2.3.1/inc/setup/cachify.apc.nginx.php
r2283367 r2505413 1 1 <?php 2 /** 3 * Setup for APC on nginx server. 4 * 5 * @package Cachify 6 */ 7 2 8 /* Quit */ 3 9 defined( 'ABSPATH' ) || exit; … … 33 39 34 40 <div style="background:#fff;border:1px solid #ccc;padding:10px 20px"> 35 <pre style="white-space: pre-wrap"><?php echo sprintf( '%s%s%s', 36 $beginning, 37 WP_PLUGIN_DIR, 38 $ending ); ?></pre> 41 <pre style="white-space: pre-wrap"> 42 <?php 43 echo sprintf( 44 '%s%s%s', 45 esc_html( $beginning ), 46 esc_html( WP_PLUGIN_DIR ), 47 esc_html( $ending ) 48 ); 49 ?> 50 </pre> 39 51 </div> 40 52 -
cachify/tags/2.3.1/inc/setup/cachify.hdd.htaccess.php
r2283367 r2505413 1 1 <?php 2 /** 3 * Setup for HDD on Apache server. 4 * 5 * @package Cachify 6 */ 7 2 8 /* Quit */ 3 9 defined( 'ABSPATH' ) || exit; … … 78 84 79 85 <div style="background:#fff;border:1px solid #ccc;padding:10px 20px"> 80 <pre style="white-space: pre-wrap"><?php echo sprintf( '%s%s%s%s%s', 81 $beginning, 82 WP_CONTENT_DIR, 83 $middle, 84 wp_make_link_relative( content_url() ), 85 $ending ); ?></pre> 86 <pre style="white-space: pre-wrap"> 87 <?php 88 echo sprintf( 89 '%s%s%s%s%s', 90 esc_html( $beginning ), 91 esc_html( WP_CONTENT_DIR ), 92 esc_html( $middle ), 93 esc_html( wp_make_link_relative( content_url() ) ), 94 esc_html( $ending ) 95 ); 96 ?> 97 </pre> 86 98 </div> -
cachify/tags/2.3.1/inc/setup/cachify.hdd.nginx.php
r2283367 r2505413 1 1 <?php 2 /** 3 * Setup for HDD on nginx server. 4 * 5 * @package Cachify 6 */ 7 2 8 /* Quit */ 3 9 defined( 'ABSPATH' ) || exit; … … 23 29 <ul style="list-style-type:circle"> 24 30 <li> 25 <?php echo sprintf( 26 esc_html__( 'For domains with FQDN, the variable %s must be used instead of %s.', 'cachify' ), 31 <?php 32 echo sprintf( 33 /* translators: variable names*/ 34 esc_html__( 'For domains with FQDN, the variable %1$s must be used instead of %2$s.', 'cachify' ), 27 35 '<code>${http_host}</code>', 28 36 '<code>${host}</code>' 29 ); ?> 37 ); 38 ?> 30 39 </li> 31 40 </ul> … … 44 53 location / { 45 54 if ( $query_string ) { 46 return 405;55 return 405; 47 56 } 48 57 if ( $request_method = POST ) { 49 return 405;58 return 405; 50 59 } 51 60 if ( $request_uri ~ /wp-admin/ ) { 52 return 405;61 return 405; 53 62 } 54 63 if ( $http_cookie ~ (wp-postpass|wordpress_logged_in|comment_author)_ ) { 55 return 405;64 return 405; 56 65 } 57 66 -
cachify/tags/2.3.1/inc/setup/cachify.memcached.nginx.php
r2283367 r2505413 1 1 <?php 2 /** 3 * Setup for Memcached. 4 * 5 * @package Cachify 6 */ 7 2 8 /* Quit */ 3 9 defined( 'ABSPATH' ) || exit; … … 23 29 <ul style="list-style-type:circle"> 24 30 <li> 25 <?php echo sprintf( 26 esc_html__( 'For domains with FQDN, the variable %s must be used instead of %s.', 'cachify' ), 31 <?php 32 echo sprintf( 33 /* translators: variable names*/ 34 esc_html__( 'For domains with FQDN, the variable %1$s must be used instead of %2$s.', 'cachify' ), 27 35 '<code>${http_host}</code>', 28 36 '<code>${host}</code>' 29 ); ?> 37 ); 38 ?> 30 39 </li> 31 40 <li> 32 <?php echo sprintf( 41 <?php 42 echo sprintf( 43 /* translators: code */ 33 44 esc_html__( 'If you have errors please try to change %1$s to %2$s This forces IPv4 because some servers that allow IPv4 and IPv6 are configured to bind memcached to IPv4 only.', 'cachify' ), 34 45 '<code>memcached_pass localhost:11211;</code>', 35 46 '<code>memcached_pass 127.0.0.1:11211;</code>' 36 ); ?> 47 ); 48 ?> 37 49 </li> 38 50 </ul> … … 53 65 54 66 if ( $query_string ) { 55 return 405;67 return 405; 56 68 } 57 69 if ( $request_method = POST ) { 58 return 405;70 return 405; 59 71 } 60 72 if ( $request_uri ~ "/wp-" ) { 61 return 405;73 return 405; 62 74 } 63 75 if ( $http_cookie ~ (wp-postpass|wordpress_logged_in|comment_author)_ ) { 64 return 405;76 return 405; 65 77 } 66 78 -
cachify/tags/2.3.1/readme.txt
r2283367 r2505413 3 3 * Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TD4AMD2D8EMZW 4 4 * Tags: acceleration, apc, cache, caching, compress, database cache, db-cache, disk cache, disk caching, google, hdd, html compression, memcached, minify, minimize, optimize, page cache, performance, quick cache, speed 5 * Stable tag: 2.3.06 5 * Requires at least: 4.4 7 * Tested up to: 5.4 6 * Tested up to: 5.7 7 * Requires PHP: 5.2.4 8 * Stable tag: 2.3.1 8 9 * License: GPLv2 or later 9 10 * License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 28 29 29 30 ### Support ### 30 * Community support via the [support forums on wordpress.org](https://wordpress.org/support/plugin/cachify )31 * Community support via the [support forums on wordpress.org](https://wordpress.org/support/plugin/cachify/) 31 32 * We don’t handle support via e-mail, Twitter, GitHub issues etc. 32 33 … … 34 35 * Active development of this plugin is handled [on GitHub](https://github.com/pluginkollektiv/cachify). 35 36 * Pull requests for documented bugs are highly appreciated. 36 * If you think you’ve found a bug (e.g. you’re experiencing unexpected behavior), please post at the [support forums](https://wordpress.org/support/plugin/cachify ) first.37 * If you want to help us translate this plugin you can do so [on WordPress Translate](https://translate.wordpress.org/projects/wp-plugins/cachify ).37 * If you think you’ve found a bug (e.g. you’re experiencing unexpected behavior), please post at the [support forums](https://wordpress.org/support/plugin/cachify/) first. 38 * If you want to help us translate this plugin you can do so [on WordPress Translate](https://translate.wordpress.org/projects/wp-plugins/cachify/). 38 39 39 40 ### Credits ### 40 * Author: [Sergej Müller](https://sergejmueller.github.io /)41 * Maintainers: [pluginkollektiv](http ://pluginkollektiv.org)41 * Author: [Sergej Müller](https://sergejmueller.github.io) 42 * Maintainers: [pluginkollektiv](https://pluginkollektiv.org) 42 43 43 44 44 45 ## Installation ## 45 * If you don’t know how to install a plugin for WordPress, [here’s how](http ://codex.wordpress.org/Managing_Plugins#Installing_Plugins).46 * If you don’t know how to install a plugin for WordPress, [here’s how](https://wordpress.org/support/article/managing-plugins/#installing-plugins). 46 47 47 48 ### Requirements ### … … 61 62 62 63 ### My Website looks in some parts broken after activating Cachify! ### 63 Please make sure there is no issue that caused by the Cache minify feature. Just deactivate it or use HTML only. If the issue still exist please feel free to report it at the [support forums](https://wordpress.org/support/plugin/cachify ). With this feature any unnecessary characters such as breaks and HTML comments are removed from the source code.64 Please make sure there is no issue that caused by the Cache minify feature. Just deactivate it or use HTML only. If the issue still exist please feel free to report it at the [support forums](https://wordpress.org/support/plugin/cachify/). With this feature any unnecessary characters such as breaks and HTML comments are removed from the source code. 64 65 65 66 ### Cachify HDD: Character encoding does not work correctly ### … … 92 93 93 94 ### The cache folder is indexed by search engines! ### 94 To ensure that Google and other search engines do not index the static contents of the cache folder (otherwise there could be duplicate content), the robots.txt file which is located in the main directory of a WordPress installation should be expanded by disabling the path to the cache file (disallow ). This issue should only happen if you use a *static robots.txt* or you changed the *wp-content* location. And so might look a robots.txt:95 To ensure that Google and other search engines do not index the static contents of the cache folder (otherwise there could be duplicate content), the robots.txt file which is located in the main directory of a WordPress installation should be expanded by disabling the path to the cache file (disallow). This issue should only happen if you use a *static robots.txt* or you changed the *wp-content* location. And so might look a robots.txt: 95 96 96 97 `User-agent: * 97 Disallow: /wp-content/cache/cachify/98 Disallow: */cache/cachify/ 98 99 Allow: /` 99 100 … … 101 102 102 103 ## Changelog ## 104 105 ### 2.3.1 ### 106 * Fix: clean up unused parameter evaluation after publishing a post to prevent PHP notice (#187) (#188) 107 * Fix: correct minor spelling mistakes (#193, props timse201) 108 * Fix: update support links (#194, props timse201) 109 110 ### 2.3.0 ### 111 * New: WP-CLI integration (#165, props derweili) 112 * New: `cachify_flush_cache_hooks` filter added to modify all hooks that flush the cache 113 * New: Flush cache when a user is created / updated / deleted 114 * New: Flush cache when a term is created / updated / deleted (#169, props derweili) 115 * New: Cache behavior after post modification is now configurable in plugin settings (#176) 116 * Enhance: Cache exceptions/User-Agents translation (#52, props timse201) 117 * Enhance: Readme FAQ (#51, props timse201) 118 * Enhance: sizeable exclusion boxes + placeholder (#53, props timse201) 119 * Enhance: FAQ and Support links (#55, props timse201) 120 * Enhance: Add text caption to "flush cache" button 121 * Enhance: Icon font converted to SVG (#64) 122 * Enhance: Improved HDD cache invalidation for hierarchical post types (#71, props Syberspace) 123 * Enhance: Unified and shortened HTML signature across all caching methods (#108) (#109) 124 * Security: Tabnabbing prevention (#55, props timse201) 125 * Maintenance: Tested up to WordPress 5.4 103 126 104 127 ### 2.2.4 ### … … 129 152 ## Upgrade Notice ## 130 153 154 ### 2.3.1 ### 155 This is a minor bug fix release that prevents PHP warnings introduced in 2.3.0. It is recommended for all users. 156 131 157 ### 2.3.0 ### 132 158 To improve Cachify and make use of new core functions, we decided to drop support for WordPress 4.3 and older. Please make sure your WordPress is always up to date. -
cachify/trunk/CHANGELOG.md
r2283367 r2505413 2 2 All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). 3 3 4 ## [2.3.0] 5 * New: WP-CLI integration, see #165, props derweili 4 ## 2.3.1 5 * Fix: clean up unused parameter evaluation after publishing a post to prevent PHP notice (#187) (#188) 6 * Fix: correct minor spelling mistakes (#193, props timse201) 7 * Fix: update support links (#194, props timse201) 8 9 ## 2.3.0 10 * New: WP-CLI integration (#165, props derweili) 6 11 * New: `cachify_flush_cache_hooks` filter added to modify all hooks that flush the cache 7 12 * New: Flush cache when a user is created / updated / deleted 8 * New: Flush cache when a term is created / updated / deleted , see #169, props derweili9 * New: Cache behavior after post modification is now configurable in plugin settings 10 * Enhance: Cache exceptions/User-Agents translation , see #52, props timse20111 * Enhance: Readme FAQ , see #51, props timse20112 * Enhance: sizeable exclusion boxes + placeholder , see #53, props timse20113 * Enhance: FAQ and Support links , see #55, props timse20113 * New: Flush cache when a term is created / updated / deleted (#169, props derweili) 14 * New: Cache behavior after post modification is now configurable in plugin settings (#176) 15 * Enhance: Cache exceptions/User-Agents translation (#52, props timse201) 16 * Enhance: Readme FAQ (#51, props timse201) 17 * Enhance: sizeable exclusion boxes + placeholder (#53, props timse201) 18 * Enhance: FAQ and Support links (#55, props timse201) 14 19 * Enhance: Add text caption to "flush cache" button 15 * Security: Tabnabbing prevention, see #55, props timse201 20 * Enhance: Icon font converted to SVG (#64) 21 * Enhance: Improved HDD cache invalidation for hierarchical post types (#71, props Syberspace) 22 * Enhance: Unified and shortened HTML signature across all caching methods (#108) (#109) 23 * Security: Tabnabbing prevention (#55, props timse201) 24 * Maintenance: Tested up to WordPress 5.4 25 16 26 17 27 ## 2.2.4 -
cachify/trunk/apc/proxy.php
r2283367 r2505413 1 1 <?php 2 /** 3 * Proxy for APC based caching. 4 * 5 * @package Cachify 6 */ 2 7 3 8 if ( ! empty( $_COOKIE ) ) { … … 19 24 function cachify_is_ssl() { 20 25 if ( isset( $_SERVER['HTTPS'] ) ) { 21 if ( 'on' === strtolower( $_SERVER['HTTPS'] ) ) { 26 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 27 if ( 'on' === strtolower( wp_unslash( $_SERVER['HTTPS'] ) ) ) { 22 28 return true; 23 29 } … … 35 41 if ( 36 42 empty( $_cachify_logged_in ) 43 && extension_loaded( 'apc' ) 37 44 && ( strpos( filter_input( INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_STRING ), '/wp-admin/' ) === false ) 38 45 && ( strpos( filter_input( INPUT_SERVER, 'HTTP_ACCEPT_ENCODING', FILTER_SANITIZE_STRING ), 'gzip' ) !== false ) 39 && extension_loaded( 'apc' )40 && ( $cache = apc_fetch( md5( ( cachify_is_ssl() ? 'https-' : '' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ) . '.cachify' ) )41 46 ) { 42 ini_set( 'zlib.output_compression', 'Off' ); 47 $prefix = cachify_is_ssl() ? 'https-' : ''; 48 $cache = apc_fetch( 49 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.InputNotValidated 50 md5( $prefix . wp_unslash( $_SERVER['HTTP_HOST'] ) . wp_unslash( $_SERVER['REQUEST_URI'] ) ) 51 . '.cachify' 52 ); 53 if ( $cache ) { 54 ini_set( 'zlib.output_compression', 'Off' ); 43 55 44 header( 'Vary: Accept-Encoding' );45 header( 'X-Powered-By: Cachify' );46 header( 'Content-Encoding: gzip' );47 header( 'Content-Length: ' . strlen( $cache ) );48 header( 'Content-Type: text/html; charset=utf-8' );56 header( 'Vary: Accept-Encoding' ); 57 header( 'X-Powered-By: Cachify' ); 58 header( 'Content-Encoding: gzip' ); 59 header( 'Content-Length: ' . strlen( $cache ) ); 60 header( 'Content-Type: text/html; charset=utf-8' ); 49 61 50 echo $cache; 51 exit; 62 echo $cache; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 63 exit; 64 } 52 65 } -
cachify/trunk/cachify.php
r2283367 r2505413 1 1 <?php 2 /* 3 Plugin Name: Cachify 4 Description: Easy to use WordPress caching plugin. Serving static blog pages from database, disk, Memcached or APC. 5 Author: pluginkollektiv 6 Author URI: https://pluginkollektiv.org 7 Plugin URI: https://cachify.pluginkollektiv.org/ 8 License: GPLv2 or later 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 Version: 2.3.0 11 Text Domain: cachify 12 Domain Path: /lang 13 */ 2 /** 3 * Plugin Name: Cachify 4 * Description: Easy to use WordPress caching plugin. Serving static blog pages from database, disk, Memcached or APC. 5 * Author: pluginkollektiv 6 * Author URI: https://pluginkollektiv.org 7 * Plugin URI: https://cachify.pluginkollektiv.org 8 * License: GPLv2 or later 9 * License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 * Version: 2.3.1 11 * Text Domain: cachify 12 * 13 * @package Cachify 14 */ 14 15 15 16 /* … … 75 76 /* WP-CLI */ 76 77 add_action( 77 'cli_init',78 array(79 'Cachify_CLI',80 'add_commands' 81 )78 'cli_init', 79 array( 80 'Cachify_CLI', 81 'add_commands', 82 ) 82 83 ); 83 84 … … 85 86 spl_autoload_register( 'cachify_autoload' ); 86 87 87 /* Autoload function */ 88 /** 89 * Autoload the class. 90 * 91 * @param string $class the class name. 92 */ 88 93 function cachify_autoload( $class ) { 89 94 if ( in_array( $class, array( 'Cachify', 'Cachify_APC', 'Cachify_DB', 'Cachify_HDD', 'Cachify_MEMCACHED', 'Cachify_CLI' ) ) ) { 90 95 require_once( 91 96 sprintf( 92 '%s/inc/ %s.class.php',97 '%s/inc/class-%s.php', 93 98 CACHIFY_DIR, 94 strtolower( $class)99 strtolower( str_replace( '_', '-', $class ) ) 95 100 ) 96 101 ); -
cachify/trunk/css/dashboard.css
r2283367 r2505413 1 1 /* @group Dashboard */ 2 #dashboard_right_now .cachify-icon {2 #dashboard_right_now .cachify-icon { 3 3 width: 19px; 4 4 height: 13px; … … 6 6 } 7 7 8 #dashboard_right_now li a.cachify-glance::before {8 #dashboard_right_now li a.cachify-glance::before { 9 9 content: ""; 10 10 padding: 0; -
cachify/trunk/css/settings.css
r2283367 r2505413 1 1 .wp-core-ui .button-flush { 2 background: #dd823b;3 border-color: #c36922 #ad5d1e #ad5d1e;4 color: #fff;5 box-shadow: 0 1px 0 #ad5d1e;6 text-shadow: 0 -1px 1px #ad5d1e,1px 0 1px #ad5d1e,0 1px 1px #ad5d1e,-1px 0 1px #ad5d1e 2 background: #dd823b; 3 border-color: #c36922 #ad5d1e #ad5d1e; 4 color: #fff; 5 box-shadow: 0 1px 0 #ad5d1e; 6 text-shadow: 0 -1px 1px #ad5d1e, 1px 0 1px #ad5d1e, 0 1px 1px #ad5d1e, -1px 0 1px #ad5d1e; 7 7 } 8 8 9 9 .wp-core-ui .button-flush:focus, 10 10 .wp-core-ui .button-flush:hover { 11 background: #df8a48;12 border-color: #ad5d1e;13 color: #fff;14 box-shadow: 0 1px 0 #ad5d1e 11 background: #df8a48; 12 border-color: #ad5d1e; 13 color: #fff; 14 box-shadow: 0 1px 0 #ad5d1e; 15 15 } 16 16 17 17 .wp-core-ui .button-flush:focus { 18 box-shadow: inset 0 1px 0 #c36922,0 0 2px 1px #33b3db 18 box-shadow: inset 0 1px 0 #c36922, 0 0 2px 1px #33b3db; 19 19 } 20 20 … … 23 23 .wp-core-ui .button-flush.active:hover, 24 24 .wp-core-ui .button-flush:active { 25 background: #c36922;26 border-color: #ad5d1e;27 box-shadow: inset 0 2px 0 #ad5d1e 25 background: #c36922; 26 border-color: #ad5d1e; 27 box-shadow: inset 0 2px 0 #ad5d1e; 28 28 } -
cachify/trunk/inc/cachify.settings.php
r2283367 r2505413 1 1 <?php 2 /** 3 * Settings page. 4 * 5 * @package Cachify 6 */ 7 2 8 /* Quit */ 3 9 defined( 'ABSPATH' ) || exit; … … 5 11 6 12 <form method="post" action="options.php"> 7 <?php settings_fields( 'cachify' ) ?>13 <?php settings_fields( 'cachify' ); ?> 8 14 <table class="form-table"> 9 15 <tr> … … 14 20 <select name="cachify[use_apc]" id="cachify_cache_method"> 15 21 <?php foreach ( self::_method_select() as $k => $v ) { ?> 16 <option value="<?php echo esc_attr( $k ) ?>" <?php selected( $options['use_apc'], $k ); ?>><?php echo esc_html( $v )?></option>22 <option value="<?php echo esc_attr( $k ); ?>" <?php selected( $options['use_apc'], $k ); ?>><?php echo esc_html( $v ); ?></option> 17 23 <?php } ?> 18 24 </select> … … 22 28 <tr> 23 29 <th scope="row"> 24 <label for="cachify_cache_expires"><?php esc_html_e( 'Cache expiration', 'cachify' ) ?></label>30 <label for="cachify_cache_expires"><?php esc_html_e( 'Cache expiration', 'cachify' ); ?></label> 25 31 </th> 26 32 <td> 27 33 <?php if ( self::METHOD_HDD === $options['use_apc'] ) : ?> 28 <input type="number" min="0" step="1" name="cachify[cache_expires]" id="cachify_cache_expires" value="" disabled="disabled" class="small-text" /> Hours 34 <input type="number" min="0" step="1" name="cachify[cache_expires]" id="cachify_cache_expires" value="" disabled="disabled" class="small-text" /> 35 <?php esc_html_e( 'Hours', 'cachify' ); ?> 29 36 <p class="description"><?php esc_html_e( 'HDD cache will only expire as you update posts or flush it yourself.', 'cachify' ); ?></p> 30 37 <?php else : ?> 31 <input type="number" min="0" step="1" name="cachify[cache_expires]" id="cachify_cache_expires" value="<?php echo esc_attr( $options['cache_expires'] ) ?>" class="small-text" />38 <input type="number" min="0" step="1" name="cachify[cache_expires]" id="cachify_cache_expires" value="<?php echo esc_attr( $options['cache_expires'] ); ?>" class="small-text" /> 32 39 <?php esc_html_e( 'Hours', 'cachify' ); ?> 33 40 <?php endif; ?> 34 41 35 42 <p class="description"> 36 <?php printf( 43 <?php 44 printf( 37 45 /* translators: Placeholder is the trash icon itself as dashicon */ 38 46 esc_html__( 'Flush the cache by clicking the button below or the %1$s icon in the admin bar.', 'cachify' ), 39 47 '<span class="dashicons dashicons-trash" aria-hidden="true"></span><span class="screen-reader-text">"' . esc_html__( 'Flush the cachify cache', 'cachify' ) . '"</span>' 40 ); ?> 48 ); 49 ?> 41 50 </p> 42 51 43 <p><a class="button button-flush" href="<?php echo wp_nonce_url( add_query_arg( '_cachify', 'flush' ), '_cachify__flush_nonce' ); ?>"><?php esc_html_e( 'Flush cache now', 'cachify' ) ?></a></p> 52 <?php 53 $flush_cache_url = wp_nonce_url( add_query_arg( '_cachify', 'flush' ), '_cachify__flush_nonce' ); 54 ?> 55 56 <p> 57 <a class="button button-flush" href="<?php echo esc_url( $flush_cache_url ); ?>"> 58 <?php esc_html_e( 'Flush cache now', 'cachify' ); ?> 59 </a> 60 </p> 44 61 </td> 45 62 </tr> … … 86 103 <fieldset> 87 104 <label for="cachify_without_ids"> 88 <input type="text" name="cachify[without_ids]" id="cachify_without_ids" placeholder="<?php esc_attr_e( 'e.g. 1, 2, 3', 'cachify' ); ?>" value="<?php echo esc_attr( $options['without_ids'] ) ?>" />89 <?php esc_html_e( 'Post/Page s-IDs', 'cachify' ); ?>105 <input type="text" name="cachify[without_ids]" id="cachify_without_ids" placeholder="<?php esc_attr_e( 'e.g. 1, 2, 3', 'cachify' ); ?>" value="<?php echo esc_attr( $options['without_ids'] ); ?>" /> 106 <?php esc_html_e( 'Post/Page IDs', 'cachify' ); ?> 90 107 </label> 91 108 … … 93 110 94 111 <label for="cachify_without_agents"> 95 <input type="text" name="cachify[without_agents]" id="cachify_without_agents" placeholder="<?php esc_attr_e( 'e.g. MSIE 6, Opera', 'cachify' ); ?>" value="<?php echo esc_attr( $options['without_agents'] ) ?>" />96 <?php esc_html_e( 'Browser User -Agents', 'cachify' ); ?>112 <input type="text" name="cachify[without_agents]" id="cachify_without_agents" placeholder="<?php esc_attr_e( 'e.g. MSIE 6, Opera', 'cachify' ); ?>" value="<?php echo esc_attr( $options['without_agents'] ); ?>" /> 113 <?php esc_html_e( 'Browser User Agents', 'cachify' ); ?> 97 114 </label> 98 115 </fieldset> … … 107 124 <select name="cachify[compress_html]" id="cachify_compress_html"> 108 125 <?php foreach ( self::_minify_select() as $k => $v ) { ?> 109 <option value="<?php echo esc_attr( $k ) ?>" <?php selected( $options['compress_html'], $k ); ?>>110 <?php echo esc_html( $v ) ?>126 <option value="<?php echo esc_attr( $k ); ?>" <?php selected( $options['compress_html'], $k ); ?>> 127 <?php echo esc_html( $v ); ?> 111 128 </option> 112 129 <?php } ?> … … 126 143 </table> 127 144 128 <?php submit_button() ?>145 <?php submit_button(); ?> 129 146 </form> -
cachify/trunk/inc/setup/cachify.apc.htaccess.php
r2283367 r2505413 1 1 <?php 2 /** 3 * Setup for APC on Apache server. 4 * 5 * @package Cachify 6 */ 7 2 8 /* Quit */ 3 9 defined( 'ABSPATH' ) || exit; … … 25 31 26 32 <div style="background:#fff;border:1px solid #ccc;padding:10px 20px"> 27 <pre style="white-space: pre-wrap"><?php echo sprintf( '%s%s%s', 28 $beginning, 29 WP_PLUGIN_DIR, 30 $ending ); ?></pre> 33 <pre style="white-space: pre-wrap"> 34 <?php 35 echo sprintf( 36 '%s%s%s', 37 esc_html( $beginning ), 38 esc_html( WP_PLUGIN_DIR ), 39 esc_html( $ending ) 40 ); 41 ?> 42 </pre> 31 43 </div> -
cachify/trunk/inc/setup/cachify.apc.nginx.php
r2283367 r2505413 1 1 <?php 2 /** 3 * Setup for APC on nginx server. 4 * 5 * @package Cachify 6 */ 7 2 8 /* Quit */ 3 9 defined( 'ABSPATH' ) || exit; … … 33 39 34 40 <div style="background:#fff;border:1px solid #ccc;padding:10px 20px"> 35 <pre style="white-space: pre-wrap"><?php echo sprintf( '%s%s%s', 36 $beginning, 37 WP_PLUGIN_DIR, 38 $ending ); ?></pre> 41 <pre style="white-space: pre-wrap"> 42 <?php 43 echo sprintf( 44 '%s%s%s', 45 esc_html( $beginning ), 46 esc_html( WP_PLUGIN_DIR ), 47 esc_html( $ending ) 48 ); 49 ?> 50 </pre> 39 51 </div> 40 52 -
cachify/trunk/inc/setup/cachify.hdd.htaccess.php
r2283367 r2505413 1 1 <?php 2 /** 3 * Setup for HDD on Apache server. 4 * 5 * @package Cachify 6 */ 7 2 8 /* Quit */ 3 9 defined( 'ABSPATH' ) || exit; … … 78 84 79 85 <div style="background:#fff;border:1px solid #ccc;padding:10px 20px"> 80 <pre style="white-space: pre-wrap"><?php echo sprintf( '%s%s%s%s%s', 81 $beginning, 82 WP_CONTENT_DIR, 83 $middle, 84 wp_make_link_relative( content_url() ), 85 $ending ); ?></pre> 86 <pre style="white-space: pre-wrap"> 87 <?php 88 echo sprintf( 89 '%s%s%s%s%s', 90 esc_html( $beginning ), 91 esc_html( WP_CONTENT_DIR ), 92 esc_html( $middle ), 93 esc_html( wp_make_link_relative( content_url() ) ), 94 esc_html( $ending ) 95 ); 96 ?> 97 </pre> 86 98 </div> -
cachify/trunk/inc/setup/cachify.hdd.nginx.php
r2283367 r2505413 1 1 <?php 2 /** 3 * Setup for HDD on nginx server. 4 * 5 * @package Cachify 6 */ 7 2 8 /* Quit */ 3 9 defined( 'ABSPATH' ) || exit; … … 23 29 <ul style="list-style-type:circle"> 24 30 <li> 25 <?php echo sprintf( 26 esc_html__( 'For domains with FQDN, the variable %s must be used instead of %s.', 'cachify' ), 31 <?php 32 echo sprintf( 33 /* translators: variable names*/ 34 esc_html__( 'For domains with FQDN, the variable %1$s must be used instead of %2$s.', 'cachify' ), 27 35 '<code>${http_host}</code>', 28 36 '<code>${host}</code>' 29 ); ?> 37 ); 38 ?> 30 39 </li> 31 40 </ul> … … 44 53 location / { 45 54 if ( $query_string ) { 46 return 405;55 return 405; 47 56 } 48 57 if ( $request_method = POST ) { 49 return 405;58 return 405; 50 59 } 51 60 if ( $request_uri ~ /wp-admin/ ) { 52 return 405;61 return 405; 53 62 } 54 63 if ( $http_cookie ~ (wp-postpass|wordpress_logged_in|comment_author)_ ) { 55 return 405;64 return 405; 56 65 } 57 66 -
cachify/trunk/inc/setup/cachify.memcached.nginx.php
r2283367 r2505413 1 1 <?php 2 /** 3 * Setup for Memcached. 4 * 5 * @package Cachify 6 */ 7 2 8 /* Quit */ 3 9 defined( 'ABSPATH' ) || exit; … … 23 29 <ul style="list-style-type:circle"> 24 30 <li> 25 <?php echo sprintf( 26 esc_html__( 'For domains with FQDN, the variable %s must be used instead of %s.', 'cachify' ), 31 <?php 32 echo sprintf( 33 /* translators: variable names*/ 34 esc_html__( 'For domains with FQDN, the variable %1$s must be used instead of %2$s.', 'cachify' ), 27 35 '<code>${http_host}</code>', 28 36 '<code>${host}</code>' 29 ); ?> 37 ); 38 ?> 30 39 </li> 31 40 <li> 32 <?php echo sprintf( 41 <?php 42 echo sprintf( 43 /* translators: code */ 33 44 esc_html__( 'If you have errors please try to change %1$s to %2$s This forces IPv4 because some servers that allow IPv4 and IPv6 are configured to bind memcached to IPv4 only.', 'cachify' ), 34 45 '<code>memcached_pass localhost:11211;</code>', 35 46 '<code>memcached_pass 127.0.0.1:11211;</code>' 36 ); ?> 47 ); 48 ?> 37 49 </li> 38 50 </ul> … … 53 65 54 66 if ( $query_string ) { 55 return 405;67 return 405; 56 68 } 57 69 if ( $request_method = POST ) { 58 return 405;70 return 405; 59 71 } 60 72 if ( $request_uri ~ "/wp-" ) { 61 return 405;73 return 405; 62 74 } 63 75 if ( $http_cookie ~ (wp-postpass|wordpress_logged_in|comment_author)_ ) { 64 return 405;76 return 405; 65 77 } 66 78 -
cachify/trunk/readme.txt
r2283367 r2505413 3 3 * Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TD4AMD2D8EMZW 4 4 * Tags: acceleration, apc, cache, caching, compress, database cache, db-cache, disk cache, disk caching, google, hdd, html compression, memcached, minify, minimize, optimize, page cache, performance, quick cache, speed 5 * Stable tag: 2.3.06 5 * Requires at least: 4.4 7 * Tested up to: 5.4 6 * Tested up to: 5.7 7 * Requires PHP: 5.2.4 8 * Stable tag: 2.3.1 8 9 * License: GPLv2 or later 9 10 * License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 28 29 29 30 ### Support ### 30 * Community support via the [support forums on wordpress.org](https://wordpress.org/support/plugin/cachify )31 * Community support via the [support forums on wordpress.org](https://wordpress.org/support/plugin/cachify/) 31 32 * We don’t handle support via e-mail, Twitter, GitHub issues etc. 32 33 … … 34 35 * Active development of this plugin is handled [on GitHub](https://github.com/pluginkollektiv/cachify). 35 36 * Pull requests for documented bugs are highly appreciated. 36 * If you think you’ve found a bug (e.g. you’re experiencing unexpected behavior), please post at the [support forums](https://wordpress.org/support/plugin/cachify ) first.37 * If you want to help us translate this plugin you can do so [on WordPress Translate](https://translate.wordpress.org/projects/wp-plugins/cachify ).37 * If you think you’ve found a bug (e.g. you’re experiencing unexpected behavior), please post at the [support forums](https://wordpress.org/support/plugin/cachify/) first. 38 * If you want to help us translate this plugin you can do so [on WordPress Translate](https://translate.wordpress.org/projects/wp-plugins/cachify/). 38 39 39 40 ### Credits ### 40 * Author: [Sergej Müller](https://sergejmueller.github.io /)41 * Maintainers: [pluginkollektiv](http ://pluginkollektiv.org)41 * Author: [Sergej Müller](https://sergejmueller.github.io) 42 * Maintainers: [pluginkollektiv](https://pluginkollektiv.org) 42 43 43 44 44 45 ## Installation ## 45 * If you don’t know how to install a plugin for WordPress, [here’s how](http ://codex.wordpress.org/Managing_Plugins#Installing_Plugins).46 * If you don’t know how to install a plugin for WordPress, [here’s how](https://wordpress.org/support/article/managing-plugins/#installing-plugins). 46 47 47 48 ### Requirements ### … … 61 62 62 63 ### My Website looks in some parts broken after activating Cachify! ### 63 Please make sure there is no issue that caused by the Cache minify feature. Just deactivate it or use HTML only. If the issue still exist please feel free to report it at the [support forums](https://wordpress.org/support/plugin/cachify ). With this feature any unnecessary characters such as breaks and HTML comments are removed from the source code.64 Please make sure there is no issue that caused by the Cache minify feature. Just deactivate it or use HTML only. If the issue still exist please feel free to report it at the [support forums](https://wordpress.org/support/plugin/cachify/). With this feature any unnecessary characters such as breaks and HTML comments are removed from the source code. 64 65 65 66 ### Cachify HDD: Character encoding does not work correctly ### … … 92 93 93 94 ### The cache folder is indexed by search engines! ### 94 To ensure that Google and other search engines do not index the static contents of the cache folder (otherwise there could be duplicate content), the robots.txt file which is located in the main directory of a WordPress installation should be expanded by disabling the path to the cache file (disallow ). This issue should only happen if you use a *static robots.txt* or you changed the *wp-content* location. And so might look a robots.txt:95 To ensure that Google and other search engines do not index the static contents of the cache folder (otherwise there could be duplicate content), the robots.txt file which is located in the main directory of a WordPress installation should be expanded by disabling the path to the cache file (disallow). This issue should only happen if you use a *static robots.txt* or you changed the *wp-content* location. And so might look a robots.txt: 95 96 96 97 `User-agent: * 97 Disallow: /wp-content/cache/cachify/98 Disallow: */cache/cachify/ 98 99 Allow: /` 99 100 … … 101 102 102 103 ## Changelog ## 104 105 ### 2.3.1 ### 106 * Fix: clean up unused parameter evaluation after publishing a post to prevent PHP notice (#187) (#188) 107 * Fix: correct minor spelling mistakes (#193, props timse201) 108 * Fix: update support links (#194, props timse201) 109 110 ### 2.3.0 ### 111 * New: WP-CLI integration (#165, props derweili) 112 * New: `cachify_flush_cache_hooks` filter added to modify all hooks that flush the cache 113 * New: Flush cache when a user is created / updated / deleted 114 * New: Flush cache when a term is created / updated / deleted (#169, props derweili) 115 * New: Cache behavior after post modification is now configurable in plugin settings (#176) 116 * Enhance: Cache exceptions/User-Agents translation (#52, props timse201) 117 * Enhance: Readme FAQ (#51, props timse201) 118 * Enhance: sizeable exclusion boxes + placeholder (#53, props timse201) 119 * Enhance: FAQ and Support links (#55, props timse201) 120 * Enhance: Add text caption to "flush cache" button 121 * Enhance: Icon font converted to SVG (#64) 122 * Enhance: Improved HDD cache invalidation for hierarchical post types (#71, props Syberspace) 123 * Enhance: Unified and shortened HTML signature across all caching methods (#108) (#109) 124 * Security: Tabnabbing prevention (#55, props timse201) 125 * Maintenance: Tested up to WordPress 5.4 103 126 104 127 ### 2.2.4 ### … … 129 152 ## Upgrade Notice ## 130 153 154 ### 2.3.1 ### 155 This is a minor bug fix release that prevents PHP warnings introduced in 2.3.0. It is recommended for all users. 156 131 157 ### 2.3.0 ### 132 158 To improve Cachify and make use of new core functions, we decided to drop support for WordPress 4.3 and older. Please make sure your WordPress is always up to date.
Note: See TracChangeset
for help on using the changeset viewer.