Plugin Directory

Changeset 2505413


Ignore:
Timestamp:
03/29/2021 05:12:12 PM (5 years ago)
Author:
pluginkollektiv
Message:

Update to version 2.3.1 from GitHub

Location:
cachify
Files:
18 added
16 deleted
31 edited
1 copied

Legend:

Unmodified
Added
Removed
  • cachify/assets/banner-1544x500.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • cachify/assets/banner-772x250.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • cachify/assets/icon-128x128.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • cachify/assets/icon-256x256.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • cachify/assets/screenshot-1.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • cachify/assets/screenshot-2.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • cachify/assets/screenshot-3.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • cachify/tags/2.3.1/CHANGELOG.md

    r2283367 r2505413  
    22All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
    33
    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)
    611* New: `cachify_flush_cache_hooks` filter added to modify all hooks that flush the cache
    712* New: Flush cache when a user is created / updated / deleted
    8 * New: Flush cache when a term is created / updated / deleted, see #169, props derweili
    9 * New: Cache behavior after post modification is now configurable in plugin settings
    10 * Enhance: Cache exceptions/User-Agents translation, see #52, props timse201
    11 * Enhance: Readme FAQ, see #51, props timse201
    12 * Enhance: sizeable exclusion boxes + placeholder, see #53, props timse201
    13 * Enhance: FAQ and Support links, see #55, props timse201
     13* 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)
    1419* 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
    1626
    1727## 2.2.4
  • cachify/tags/2.3.1/apc/proxy.php

    r2283367 r2505413  
    11<?php
     2/**
     3 * Proxy for APC based caching.
     4 *
     5 * @package Cachify
     6 */
    27
    38if ( ! empty( $_COOKIE ) ) {
     
    1924function cachify_is_ssl() {
    2025    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'] ) ) ) {
    2228            return true;
    2329        }
     
    3541if (
    3642    empty( $_cachify_logged_in )
     43    && extension_loaded( 'apc' )
    3744    && ( strpos( filter_input( INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_STRING ), '/wp-admin/' ) === false )
    3845    && ( 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' ) )
    4146) {
    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' );
    4355
    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' );
    4961
    50     echo $cache;
    51     exit;
     62        echo $cache; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     63        exit;
     64    }
    5265}
  • cachify/tags/2.3.1/cachify.php

    r2283367 r2505413  
    11<?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 */
    1415
    1516/*
     
    7576/* WP-CLI */
    7677add_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    )
    8283);
    8384
     
    8586spl_autoload_register( 'cachify_autoload' );
    8687
    87 /* Autoload function */
     88/**
     89 * Autoload the class.
     90 *
     91 * @param string $class the class name.
     92 */
    8893function cachify_autoload( $class ) {
    8994    if ( in_array( $class, array( 'Cachify', 'Cachify_APC', 'Cachify_DB', 'Cachify_HDD', 'Cachify_MEMCACHED', 'Cachify_CLI' ) ) ) {
    9095        require_once(
    9196            sprintf(
    92                 '%s/inc/%s.class.php',
     97                '%s/inc/class-%s.php',
    9398                CACHIFY_DIR,
    94                 strtolower( $class )
     99                strtolower( str_replace( '_', '-', $class ) )
    95100            )
    96101        );
  • cachify/tags/2.3.1/css/dashboard.css

    r2283367 r2505413  
    11/* @group Dashboard */
    2 #dashboard_right_now .cachify-icon{
     2#dashboard_right_now .cachify-icon {
    33    width: 19px;
    44    height: 13px;
     
    66}
    77
    8 #dashboard_right_now li a.cachify-glance::before{
     8#dashboard_right_now li a.cachify-glance::before {
    99    content: "";
    1010    padding: 0;
  • cachify/tags/2.3.1/css/settings.css

    r2283367 r2505413  
    11.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;
    77}
    88
    99.wp-core-ui .button-flush:focus,
    1010.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;
    1515}
    1616
    1717.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;
    1919}
    2020
     
    2323.wp-core-ui .button-flush.active:hover,
    2424.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;
    2828}
  • cachify/tags/2.3.1/inc/cachify.settings.php

    r2283367 r2505413  
    11<?php
     2/**
     3 * Settings page.
     4 *
     5 * @package Cachify
     6 */
     7
    28/* Quit */
    39defined( 'ABSPATH' ) || exit;
     
    511
    612<form method="post" action="options.php">
    7     <?php settings_fields( 'cachify' ) ?>
     13    <?php settings_fields( 'cachify' ); ?>
    814    <table class="form-table">
    915        <tr>
     
    1420                <select name="cachify[use_apc]" id="cachify_cache_method">
    1521                    <?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>
    1723                    <?php } ?>
    1824                </select>
     
    2228        <tr>
    2329            <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>
    2531            </th>
    2632            <td>
    2733                <?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' ); ?>
    2936                    <p class="description"><?php esc_html_e( 'HDD cache will only expire as you update posts or flush it yourself.', 'cachify' ); ?></p>
    3037                <?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" />
    3239                    <?php esc_html_e( 'Hours', 'cachify' ); ?>
    3340                <?php endif; ?>
    3441
    3542                <p class="description">
    36                     <?php printf(
     43                    <?php
     44                    printf(
    3745                        /* translators: Placeholder is the trash icon itself as dashicon */
    3846                        esc_html__( 'Flush the cache by clicking the button below or the %1$s icon in the admin bar.', 'cachify' ),
    3947                        '<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                    ?>
    4150                </p>
    4251
    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>
    4461            </td>
    4562        </tr>
     
    86103                <fieldset>
    87104                    <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/Pages-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' ); ?>
    90107                    </label>
    91108
     
    93110
    94111                    <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' ); ?>
    97114                    </label>
    98115                </fieldset>
     
    107124                <select name="cachify[compress_html]" id="cachify_compress_html">
    108125                    <?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 ); ?>
    111128                    </option>
    112129                    <?php } ?>
     
    126143    </table>
    127144
    128     <?php submit_button() ?>
     145    <?php submit_button(); ?>
    129146</form>
  • cachify/tags/2.3.1/inc/setup/cachify.apc.htaccess.php

    r2283367 r2505413  
    11<?php
     2/**
     3 * Setup for APC on Apache server.
     4 *
     5 * @package Cachify
     6 */
     7
    28/* Quit */
    39defined( 'ABSPATH' ) || exit;
     
    2531
    2632    <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>
    3143    </div>
  • cachify/tags/2.3.1/inc/setup/cachify.apc.nginx.php

    r2283367 r2505413  
    11<?php
     2/**
     3 * Setup for APC on nginx server.
     4 *
     5 * @package Cachify
     6 */
     7
    28/* Quit */
    39defined( 'ABSPATH' ) || exit;
     
    3339
    3440    <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>
    3951    </div>
    4052
  • cachify/tags/2.3.1/inc/setup/cachify.hdd.htaccess.php

    r2283367 r2505413  
    11<?php
     2/**
     3 * Setup for HDD on Apache server.
     4 *
     5 * @package Cachify
     6 */
     7
    28/* Quit */
    39defined( 'ABSPATH' ) || exit;
     
    7884
    7985    <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>
    8698    </div>
  • cachify/tags/2.3.1/inc/setup/cachify.hdd.nginx.php

    r2283367 r2505413  
    11<?php
     2/**
     3 * Setup for HDD on nginx server.
     4 *
     5 * @package Cachify
     6 */
     7
    28/* Quit */
    39defined( 'ABSPATH' ) || exit;
     
    2329                <ul style="list-style-type:circle">
    2430                    <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' ),
    2735                            '<code>${http_host}</code>',
    2836                            '<code>${host}</code>'
    29                         ); ?>
     37                        );
     38                        ?>
    3039                    </li>
    3140                </ul>
     
    4453location / {
    4554  if ( $query_string ) {
    46     return 405;
     55    return 405;
    4756  }
    4857  if ( $request_method = POST ) {
    49     return 405;
     58    return 405;
    5059  }
    5160  if ( $request_uri ~ /wp-admin/ ) {
    52     return 405;
     61    return 405;
    5362  }
    5463  if ( $http_cookie ~ (wp-postpass|wordpress_logged_in|comment_author)_ ) {
    55     return 405;
     64    return 405;
    5665  }
    5766
  • cachify/tags/2.3.1/inc/setup/cachify.memcached.nginx.php

    r2283367 r2505413  
    11<?php
     2/**
     3 * Setup for Memcached.
     4 *
     5 * @package Cachify
     6 */
     7
    28/* Quit */
    39defined( 'ABSPATH' ) || exit;
     
    2329                <ul style="list-style-type:circle">
    2430                    <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' ),
    2735                            '<code>${http_host}</code>',
    2836                            '<code>${host}</code>'
    29                         ); ?>
     37                        );
     38                        ?>
    3039                    </li>
    3140                    <li>
    32                         <?php echo sprintf(
     41                        <?php
     42                        echo sprintf(
     43                            /* translators: code */
    3344                            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' ),
    3445                            '<code>memcached_pass localhost:11211;</code>',
    3546                            '<code>memcached_pass 127.0.0.1:11211;</code>'
    36                         ); ?>
     47                        );
     48                        ?>
    3749                    </li>
    3850                </ul>
     
    5365
    5466  if ( $query_string ) {
    55     return 405;
     67    return 405;
    5668  }
    5769  if ( $request_method = POST ) {
    58     return 405;
     70    return 405;
    5971  }
    6072  if ( $request_uri ~ "/wp-" ) {
    61     return 405;
     73    return 405;
    6274  }
    6375  if ( $http_cookie ~ (wp-postpass|wordpress_logged_in|comment_author)_ ) {
    64     return 405;
     76    return 405;
    6577  }
    6678
  • cachify/tags/2.3.1/readme.txt

    r2283367 r2505413  
    33* Donate link:       https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TD4AMD2D8EMZW
    44* 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.0
    65* 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
    89* License:           GPLv2 or later
    910* License URI:       http://www.gnu.org/licenses/gpl-2.0.html
     
    2829
    2930### 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/)
    3132* We don’t handle support via e-mail, Twitter, GitHub issues etc.
    3233
     
    3435* Active development of this plugin is handled [on GitHub](https://github.com/pluginkollektiv/cachify).
    3536* 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/).
    3839
    3940### 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)
    4243
    4344
    4445## 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).
    4647
    4748### Requirements ###
     
    6162
    6263### 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.
     64Please 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.
    6465
    6566### Cachify HDD: Character encoding does not work correctly ###
     
    9293
    9394### 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:
     95To 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:
    9596
    9697`User-agent: *
    97 Disallow: /wp-content/cache/cachify/
     98Disallow: */cache/cachify/
    9899Allow: /`
    99100
     
    101102
    102103## 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
    103126
    104127### 2.2.4 ###
     
    129152## Upgrade Notice ##
    130153
     154### 2.3.1 ###
     155This is a minor bug fix release that prevents PHP warnings introduced in 2.3.0. It is recommended for all users.
     156
    131157### 2.3.0 ###
    132158To 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  
    22All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
    33
    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)
    611* New: `cachify_flush_cache_hooks` filter added to modify all hooks that flush the cache
    712* New: Flush cache when a user is created / updated / deleted
    8 * New: Flush cache when a term is created / updated / deleted, see #169, props derweili
    9 * New: Cache behavior after post modification is now configurable in plugin settings
    10 * Enhance: Cache exceptions/User-Agents translation, see #52, props timse201
    11 * Enhance: Readme FAQ, see #51, props timse201
    12 * Enhance: sizeable exclusion boxes + placeholder, see #53, props timse201
    13 * Enhance: FAQ and Support links, see #55, props timse201
     13* 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)
    1419* 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
    1626
    1727## 2.2.4
  • cachify/trunk/apc/proxy.php

    r2283367 r2505413  
    11<?php
     2/**
     3 * Proxy for APC based caching.
     4 *
     5 * @package Cachify
     6 */
    27
    38if ( ! empty( $_COOKIE ) ) {
     
    1924function cachify_is_ssl() {
    2025    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'] ) ) ) {
    2228            return true;
    2329        }
     
    3541if (
    3642    empty( $_cachify_logged_in )
     43    && extension_loaded( 'apc' )
    3744    && ( strpos( filter_input( INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_STRING ), '/wp-admin/' ) === false )
    3845    && ( 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' ) )
    4146) {
    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' );
    4355
    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' );
    4961
    50     echo $cache;
    51     exit;
     62        echo $cache; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     63        exit;
     64    }
    5265}
  • cachify/trunk/cachify.php

    r2283367 r2505413  
    11<?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 */
    1415
    1516/*
     
    7576/* WP-CLI */
    7677add_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    )
    8283);
    8384
     
    8586spl_autoload_register( 'cachify_autoload' );
    8687
    87 /* Autoload function */
     88/**
     89 * Autoload the class.
     90 *
     91 * @param string $class the class name.
     92 */
    8893function cachify_autoload( $class ) {
    8994    if ( in_array( $class, array( 'Cachify', 'Cachify_APC', 'Cachify_DB', 'Cachify_HDD', 'Cachify_MEMCACHED', 'Cachify_CLI' ) ) ) {
    9095        require_once(
    9196            sprintf(
    92                 '%s/inc/%s.class.php',
     97                '%s/inc/class-%s.php',
    9398                CACHIFY_DIR,
    94                 strtolower( $class )
     99                strtolower( str_replace( '_', '-', $class ) )
    95100            )
    96101        );
  • cachify/trunk/css/dashboard.css

    r2283367 r2505413  
    11/* @group Dashboard */
    2 #dashboard_right_now .cachify-icon{
     2#dashboard_right_now .cachify-icon {
    33    width: 19px;
    44    height: 13px;
     
    66}
    77
    8 #dashboard_right_now li a.cachify-glance::before{
     8#dashboard_right_now li a.cachify-glance::before {
    99    content: "";
    1010    padding: 0;
  • cachify/trunk/css/settings.css

    r2283367 r2505413  
    11.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;
    77}
    88
    99.wp-core-ui .button-flush:focus,
    1010.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;
    1515}
    1616
    1717.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;
    1919}
    2020
     
    2323.wp-core-ui .button-flush.active:hover,
    2424.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;
    2828}
  • cachify/trunk/inc/cachify.settings.php

    r2283367 r2505413  
    11<?php
     2/**
     3 * Settings page.
     4 *
     5 * @package Cachify
     6 */
     7
    28/* Quit */
    39defined( 'ABSPATH' ) || exit;
     
    511
    612<form method="post" action="options.php">
    7     <?php settings_fields( 'cachify' ) ?>
     13    <?php settings_fields( 'cachify' ); ?>
    814    <table class="form-table">
    915        <tr>
     
    1420                <select name="cachify[use_apc]" id="cachify_cache_method">
    1521                    <?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>
    1723                    <?php } ?>
    1824                </select>
     
    2228        <tr>
    2329            <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>
    2531            </th>
    2632            <td>
    2733                <?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' ); ?>
    2936                    <p class="description"><?php esc_html_e( 'HDD cache will only expire as you update posts or flush it yourself.', 'cachify' ); ?></p>
    3037                <?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" />
    3239                    <?php esc_html_e( 'Hours', 'cachify' ); ?>
    3340                <?php endif; ?>
    3441
    3542                <p class="description">
    36                     <?php printf(
     43                    <?php
     44                    printf(
    3745                        /* translators: Placeholder is the trash icon itself as dashicon */
    3846                        esc_html__( 'Flush the cache by clicking the button below or the %1$s icon in the admin bar.', 'cachify' ),
    3947                        '<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                    ?>
    4150                </p>
    4251
    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>
    4461            </td>
    4562        </tr>
     
    86103                <fieldset>
    87104                    <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/Pages-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' ); ?>
    90107                    </label>
    91108
     
    93110
    94111                    <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' ); ?>
    97114                    </label>
    98115                </fieldset>
     
    107124                <select name="cachify[compress_html]" id="cachify_compress_html">
    108125                    <?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 ); ?>
    111128                    </option>
    112129                    <?php } ?>
     
    126143    </table>
    127144
    128     <?php submit_button() ?>
     145    <?php submit_button(); ?>
    129146</form>
  • cachify/trunk/inc/setup/cachify.apc.htaccess.php

    r2283367 r2505413  
    11<?php
     2/**
     3 * Setup for APC on Apache server.
     4 *
     5 * @package Cachify
     6 */
     7
    28/* Quit */
    39defined( 'ABSPATH' ) || exit;
     
    2531
    2632    <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>
    3143    </div>
  • cachify/trunk/inc/setup/cachify.apc.nginx.php

    r2283367 r2505413  
    11<?php
     2/**
     3 * Setup for APC on nginx server.
     4 *
     5 * @package Cachify
     6 */
     7
    28/* Quit */
    39defined( 'ABSPATH' ) || exit;
     
    3339
    3440    <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>
    3951    </div>
    4052
  • cachify/trunk/inc/setup/cachify.hdd.htaccess.php

    r2283367 r2505413  
    11<?php
     2/**
     3 * Setup for HDD on Apache server.
     4 *
     5 * @package Cachify
     6 */
     7
    28/* Quit */
    39defined( 'ABSPATH' ) || exit;
     
    7884
    7985    <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>
    8698    </div>
  • cachify/trunk/inc/setup/cachify.hdd.nginx.php

    r2283367 r2505413  
    11<?php
     2/**
     3 * Setup for HDD on nginx server.
     4 *
     5 * @package Cachify
     6 */
     7
    28/* Quit */
    39defined( 'ABSPATH' ) || exit;
     
    2329                <ul style="list-style-type:circle">
    2430                    <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' ),
    2735                            '<code>${http_host}</code>',
    2836                            '<code>${host}</code>'
    29                         ); ?>
     37                        );
     38                        ?>
    3039                    </li>
    3140                </ul>
     
    4453location / {
    4554  if ( $query_string ) {
    46     return 405;
     55    return 405;
    4756  }
    4857  if ( $request_method = POST ) {
    49     return 405;
     58    return 405;
    5059  }
    5160  if ( $request_uri ~ /wp-admin/ ) {
    52     return 405;
     61    return 405;
    5362  }
    5463  if ( $http_cookie ~ (wp-postpass|wordpress_logged_in|comment_author)_ ) {
    55     return 405;
     64    return 405;
    5665  }
    5766
  • cachify/trunk/inc/setup/cachify.memcached.nginx.php

    r2283367 r2505413  
    11<?php
     2/**
     3 * Setup for Memcached.
     4 *
     5 * @package Cachify
     6 */
     7
    28/* Quit */
    39defined( 'ABSPATH' ) || exit;
     
    2329                <ul style="list-style-type:circle">
    2430                    <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' ),
    2735                            '<code>${http_host}</code>',
    2836                            '<code>${host}</code>'
    29                         ); ?>
     37                        );
     38                        ?>
    3039                    </li>
    3140                    <li>
    32                         <?php echo sprintf(
     41                        <?php
     42                        echo sprintf(
     43                            /* translators: code */
    3344                            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' ),
    3445                            '<code>memcached_pass localhost:11211;</code>',
    3546                            '<code>memcached_pass 127.0.0.1:11211;</code>'
    36                         ); ?>
     47                        );
     48                        ?>
    3749                    </li>
    3850                </ul>
     
    5365
    5466  if ( $query_string ) {
    55     return 405;
     67    return 405;
    5668  }
    5769  if ( $request_method = POST ) {
    58     return 405;
     70    return 405;
    5971  }
    6072  if ( $request_uri ~ "/wp-" ) {
    61     return 405;
     73    return 405;
    6274  }
    6375  if ( $http_cookie ~ (wp-postpass|wordpress_logged_in|comment_author)_ ) {
    64     return 405;
     76    return 405;
    6577  }
    6678
  • cachify/trunk/readme.txt

    r2283367 r2505413  
    33* Donate link:       https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TD4AMD2D8EMZW
    44* 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.0
    65* 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
    89* License:           GPLv2 or later
    910* License URI:       http://www.gnu.org/licenses/gpl-2.0.html
     
    2829
    2930### 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/)
    3132* We don’t handle support via e-mail, Twitter, GitHub issues etc.
    3233
     
    3435* Active development of this plugin is handled [on GitHub](https://github.com/pluginkollektiv/cachify).
    3536* 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/).
    3839
    3940### 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)
    4243
    4344
    4445## 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).
    4647
    4748### Requirements ###
     
    6162
    6263### 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.
     64Please 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.
    6465
    6566### Cachify HDD: Character encoding does not work correctly ###
     
    9293
    9394### 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:
     95To 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:
    9596
    9697`User-agent: *
    97 Disallow: /wp-content/cache/cachify/
     98Disallow: */cache/cachify/
    9899Allow: /`
    99100
     
    101102
    102103## 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
    103126
    104127### 2.2.4 ###
     
    129152## Upgrade Notice ##
    130153
     154### 2.3.1 ###
     155This is a minor bug fix release that prevents PHP warnings introduced in 2.3.0. It is recommended for all users.
     156
    131157### 2.3.0 ###
    132158To 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.