Changeset 2151400
- Timestamp:
- 09/05/2019 08:00:43 AM (7 years ago)
- Location:
- vcaching/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
vcaching.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vcaching/trunk/readme.txt
r1914709 r2151400 4 4 Tags: varnish, purge, cache, caching, optimization, performance, traffic 5 5 Requires at least: 4.0 6 Tested up to: 4.96 Tested up to: 5.3 7 7 Requires PHP: 5.2.4 8 Stable tag: 1. 6.98 Stable tag: 1.7.0 9 9 License: GPLv2 or later 10 10 … … 118 118 == Changelog == 119 119 120 = 1.7.0 = 121 * various bugfixes 122 120 123 = 1.6.9 = 121 124 * fixed php notice -
vcaching/trunk/vcaching.php
r1914709 r2151400 4 4 Plugin URI: http://wordpress.org/extend/plugins/vcaching/ 5 5 Description: WordPress Varnish Cache integration. 6 Version: 1. 6.96 Version: 1.7.0 7 7 Author: Razvan Stanga 8 8 Author URI: http://git.razvi.ro/ … … 11 11 Network: true 12 12 13 Copyright 201 7: Razvan Stanga (email: varnish-caching@razvi.ro)13 Copyright 2019: Razvan Stanga (email: varnish-caching@razvi.ro) 14 14 */ 15 15 … … 37 37 protected $purgeOnMenuSave = false; 38 38 protected $currentTab; 39 protected $useSsl = false;40 39 41 40 public function __construct() … … 45 44 46 45 $this->blogId = $blog_id; 47 add_action('init', array(&$this, 'init') );46 add_action('init', array(&$this, 'init'), 11); 48 47 add_action('activity_box_end', array($this, 'varnish_glance'), 100); 49 48 } … … 63 62 ) 64 63 ); 64 65 $this->postTypes = get_post_types(array('show_in_rest' => true)); 65 66 66 67 $this->setup_ips_to_hosts(); … … 138 139 } 139 140 $this->currentTab = isset($_GET['tab']) ? $_GET['tab'] : 'options'; 140 $this->useSsl = get_option($this->prefix . 'ssl');141 141 } 142 142 … … 393 393 } 394 394 395 $schema = apply_filters('vcaching_schema', $this->useSsl ? 'https://' : 'http://');395 $schema = apply_filters('vcaching_schema', (get_option($this->prefix . 'ssl') ? 'https://' : 'http://')); 396 396 397 397 foreach ($this->ipsToHosts as $key => $ipToHost) { … … 534 534 { 535 535 $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 } 537 539 } 538 540 … … 540 542 { 541 543 $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 } 543 547 } 544 548
Note: See TracChangeset
for help on using the changeset viewer.