Plugin Directory

Changeset 1552133


Ignore:
Timestamp:
12/11/2016 10:13:59 PM (9 years ago)
Author:
GatorDog
Message:

use abspath for doc root dir and enqueue dash icons

Location:
gator-cache/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • gator-cache/trunk/gator-cache.php

    r1520541 r1552133  
    22/**
    33 * @package Gator Cache
    4  * @version 2.1.3
     4 * @version 2.1.4
    55 */
    66/*
     
    1212Text Domain: gator-cache
    1313Domain Path: /lang
    14 Version: 2.1.3
     14Version: 2.1.4
    1515*/
    1616class WpGatorCache
     
    4848    protected static $multiSiteData;
    4949    const PREFIX = 'gtr_cache';
    50     const VERSION = '2.1.3';
     50    const VERSION = '2.1.4';
    5151    const JP_MOBILE_MOD = 'minileven'; // JetPack mobile module slug
    5252    const SUPPORT_LINK = 'https://wordpress.org/support/plugin/gator-cache';
     
    249249    public static function loadPurgeScripts()
    250250    {
     251        wp_enqueue_style('dash-icons');
    251252        wp_enqueue_script('gc-purge', ($pluginUrl = plugins_url(null, __FILE__)) . '/js/gator-cache-purge.min.js', array('jquery'), null, true);
    252253        wp_localize_script('gc-purge', 'gcData', array(
  • gator-cache/trunk/lib/GatorCachePlugin.php

    r1515890 r1552133  
    232232            }
    233233            // make the object cache
    234             @mkdir($ocPath = str_replace('/gator_cache', '/gator_cache_oc', $path), 0755);
     234            // @mkdir($ocPath = str_replace('/gator_cache', '/gator_cache_oc', $path), 0755);
    235235            //put htaccess here to prevent direct access
    236236            @file_put_contents($path . DIRECTORY_SEPARATOR . '.htaccess', "Order Deny,Allow\nDeny from all\nAllow from env=redirect_gc_green\n");
    237             @file_put_contents($ocPath . DIRECTORY_SEPARATOR . '.htaccess', "Order Deny,Allow\nDeny from all\n");
     237            // @file_put_contents($ocPath . DIRECTORY_SEPARATOR . '.htaccess', "Order Deny,Allow\nDeny from all\n");
    238238        }
    239239        //cache dir created or exists - get the group for subdir support or people that put blogs in the doc root
     
    279279    }
    280280
    281     public function getInitDir($inRoot = false)
    282     {
    283         if (null === ($dir = GatorCache::getRequest()->getServer('DOCUMENT_ROOT'))
     281    public function getInitDir($inRoot = false, $show = false)
     282    {
     283        if (defined('ABSPATH')) {
     284            $dir = ABSPATH;
     285        }
     286        elseif (null === ($dir = GatorCache::getRequest()->getServer('DOCUMENT_ROOT'))
    284287          && null === ($dir = GatorCache::getRequest()->getServer('PWD'))) {
    285             $dir = defined(ABSPATH) ? ABSPATH : realpath('./../../');
     288            $dir = realpath('./../../');
    286289        }
    287290        return ($inRoot ? $dir : dirname($dir)) . DIRECTORY_SEPARATOR . 'gator_cache';
  • gator-cache/trunk/readme.txt

    r1520541 r1552133  
    55Requires at least: 3.8
    66Tested up to: 4.6.1
    7 Stable tag: 2.1.3
     7Stable tag: 2.1.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5454Typically when a cache is refreshed, the cached file and it's contents are deleted. This is what GatorCache does when a post or page is updated. Then when a vistor visits that page, the cache is re-generated on the fly. This works well in most scenarios. However, if your pages are really slow when not cached, you can set GatorCache to "warm the cache". This simply means that when a post is updated and the content is removed from the cache, the post url will be pinged in the background in order to re-generate the cached content. This will prevent any visitors from getting non-cached content and slow-loading pages. Please note that when you purge the entire cache, and have cache warming enabled, that this will not regenerate the cache for the entire site.
    5555
     56== Changelog ==
     57= 2.1.4 =
     58* Verify compatiblity with WordPress 4.7
     59* Use ABSPATH for installation directory when installed in document root
    5660== Changelog ==
    5761= 2.1.3 =
Note: See TracChangeset for help on using the changeset viewer.