Plugin Directory

Changeset 2151400


Ignore:
Timestamp:
09/05/2019 08:00:43 AM (7 years ago)
Author:
razvanstanga
Message:

bugfixes & tagging version 1.7.0

Location:
vcaching/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • vcaching/trunk/readme.txt

    r1914709 r2151400  
    44Tags: varnish, purge, cache, caching, optimization, performance, traffic
    55Requires at least: 4.0
    6 Tested up to: 4.9
     6Tested up to: 5.3
    77Requires PHP: 5.2.4
    8 Stable tag: 1.6.9
     8Stable tag: 1.7.0
    99License: GPLv2 or later
    1010
     
    118118== Changelog ==
    119119
     120= 1.7.0 =
     121* various bugfixes
     122
    120123= 1.6.9 =
    121124* fixed php notice
  • vcaching/trunk/vcaching.php

    r1914709 r2151400  
    44Plugin URI: http://wordpress.org/extend/plugins/vcaching/
    55Description: WordPress Varnish Cache integration.
    6 Version: 1.6.9
     6Version: 1.7.0
    77Author: Razvan Stanga
    88Author URI: http://git.razvi.ro/
     
    1111Network: true
    1212
    13 Copyright 2017: Razvan Stanga (email: varnish-caching@razvi.ro)
     13Copyright 2019: Razvan Stanga (email: varnish-caching@razvi.ro)
    1414*/
    1515
     
    3737    protected $purgeOnMenuSave = false;
    3838    protected $currentTab;
    39     protected $useSsl = false;
    4039
    4140    public function __construct()
     
    4544
    4645        $this->blogId = $blog_id;
    47         add_action('init', array(&$this, 'init'));
     46        add_action('init', array(&$this, 'init'), 11);
    4847        add_action('activity_box_end', array($this, 'varnish_glance'), 100);
    4948    }
     
    6362            )
    6463        );
     64
     65        $this->postTypes = get_post_types(array('show_in_rest' => true));
    6566
    6667        $this->setup_ips_to_hosts();
     
    138139        }
    139140        $this->currentTab = isset($_GET['tab']) ? $_GET['tab'] : 'options';
    140         $this->useSsl = get_option($this->prefix . 'ssl');
    141141    }
    142142
     
    393393        }
    394394
    395         $schema = apply_filters('vcaching_schema', $this->useSsl ? 'https://' : 'http://');
     395        $schema = apply_filters('vcaching_schema', (get_option($this->prefix . 'ssl') ? 'https://' : 'http://'));
    396396
    397397        foreach ($this->ipsToHosts as $key => $ipToHost) {
     
    534534    {
    535535        $cookie = get_option($this->prefix . 'cookie');
    536         setcookie($cookie, 1, time()+3600*24*100, COOKIEPATH, COOKIE_DOMAIN, false, true);
     536        if (!empty($cookie)) {
     537            setcookie($cookie, 1, time()+3600*24*100, COOKIEPATH, COOKIE_DOMAIN, false, true);
     538        }
    537539    }
    538540
     
    540542    {
    541543        $cookie = get_option($this->prefix . 'cookie');
    542         setcookie($cookie, null, time()-3600*24*100, COOKIEPATH, COOKIE_DOMAIN, false, true);
     544        if (!empty($cookie)) {
     545            setcookie($cookie, null, time()-3600*24*100, COOKIEPATH, COOKIE_DOMAIN, false, true);
     546        }
    543547    }
    544548
Note: See TracChangeset for help on using the changeset viewer.