Changeset 2420356
- Timestamp:
- 11/17/2020 09:33:27 PM (5 years ago)
- Location:
- dd-lastviewed
- Files:
-
- 4 edited
- 1 copied
-
tags/6.2.1 (copied) (copied from dd-lastviewed/trunk)
-
tags/6.2.1/last-viewed.php (modified) (3 diffs)
-
tags/6.2.1/readme.txt (modified) (2 diffs)
-
trunk/last-viewed.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dd-lastviewed/tags/6.2.1/last-viewed.php
r2419639 r2420356 2 2 /* 3 3 Plugin Name: DD Last Viewed 4 Version: 6.2 4 Version: 6.2.1 5 5 Plugin URI: http://wouterdijkstra.com 6 6 Description: Shows the users recently viewed/visited posts, filtered on types or terms, in a widget. … … 153 153 $secure = isset($cookie['secure']) && $cookie['secure'] === '1'; 154 154 155 $cookieOptions 2= array(155 $cookieOptions = array( 156 156 'expires' => $cookie['expire'], 157 157 'path' => $cookie['path'] … … 159 159 160 160 if ($this->isHttps() && !$cookie['advanced_checked']) { 161 $cookieOptions 2['samesite'] = $this->cookieSameSite_default;161 $cookieOptions['samesite'] = $this->cookieSameSite_default; 162 162 } 163 163 164 164 if ($cookie['advanced_checked']) { 165 $cookieOptions 2['expires'] = $cookie['expire'];166 $cookieOptions 2['path'] = $cookie['path'];167 $cookieOptions 2['samesite'] = $sameSite;168 $cookieOptions 2['secure'] = $secure;165 $cookieOptions['expires'] = $cookie['expire']; 166 $cookieOptions['path'] = $cookie['path']; 167 $cookieOptions['samesite'] = $sameSite; 168 $cookieOptions['secure'] = $secure; 169 169 } 170 setcookie( $cookie['name'], $cookie['list'], $cookieOptions2 ); 170 171 if (version_compare(PHP_VERSION, '7.3') >= 0) { 172 // php version > 7.3 173 setcookie( $cookie['name'], $cookie['list'], $cookieOptions ); 174 } else { 175 // php version < 7.3 176 if($secure) { 177 setcookie($cookie['name'], $cookie['list'], $cookie['expire'], $cookie['path'], "", 1); 178 } else { 179 setcookie($cookie['name'], $cookie['list'], $cookie['expire'], $cookie['path']); 180 } 181 } 171 182 } 172 183 } -
dd-lastviewed/tags/6.2.1/readme.txt
r2419639 r2420356 5 5 Requires at least: 3.3 6 6 Tested up to: 5.5.3 7 Stable tag: 6.2 7 Stable tag: 6.2.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 56 56 == Changelog == 57 57 58 = 6.2.1 = 59 * Fix setCookie for diff php versions > or < 7.3 (options array) 60 58 61 = 6.2 = 59 62 * pre-fill post types with 'post and pages' if emtpy -
dd-lastviewed/trunk/last-viewed.php
r2419639 r2420356 2 2 /* 3 3 Plugin Name: DD Last Viewed 4 Version: 6.2 4 Version: 6.2.1 5 5 Plugin URI: http://wouterdijkstra.com 6 6 Description: Shows the users recently viewed/visited posts, filtered on types or terms, in a widget. … … 153 153 $secure = isset($cookie['secure']) && $cookie['secure'] === '1'; 154 154 155 $cookieOptions 2= array(155 $cookieOptions = array( 156 156 'expires' => $cookie['expire'], 157 157 'path' => $cookie['path'] … … 159 159 160 160 if ($this->isHttps() && !$cookie['advanced_checked']) { 161 $cookieOptions 2['samesite'] = $this->cookieSameSite_default;161 $cookieOptions['samesite'] = $this->cookieSameSite_default; 162 162 } 163 163 164 164 if ($cookie['advanced_checked']) { 165 $cookieOptions 2['expires'] = $cookie['expire'];166 $cookieOptions 2['path'] = $cookie['path'];167 $cookieOptions 2['samesite'] = $sameSite;168 $cookieOptions 2['secure'] = $secure;165 $cookieOptions['expires'] = $cookie['expire']; 166 $cookieOptions['path'] = $cookie['path']; 167 $cookieOptions['samesite'] = $sameSite; 168 $cookieOptions['secure'] = $secure; 169 169 } 170 setcookie( $cookie['name'], $cookie['list'], $cookieOptions2 ); 170 171 if (version_compare(PHP_VERSION, '7.3') >= 0) { 172 // php version > 7.3 173 setcookie( $cookie['name'], $cookie['list'], $cookieOptions ); 174 } else { 175 // php version < 7.3 176 if($secure) { 177 setcookie($cookie['name'], $cookie['list'], $cookie['expire'], $cookie['path'], "", 1); 178 } else { 179 setcookie($cookie['name'], $cookie['list'], $cookie['expire'], $cookie['path']); 180 } 181 } 171 182 } 172 183 } -
dd-lastviewed/trunk/readme.txt
r2419639 r2420356 5 5 Requires at least: 3.3 6 6 Tested up to: 5.5.3 7 Stable tag: 6.2 7 Stable tag: 6.2.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 56 56 == Changelog == 57 57 58 = 6.2.1 = 59 * Fix setCookie for diff php versions > or < 7.3 (options array) 60 58 61 = 6.2 = 59 62 * pre-fill post types with 'post and pages' if emtpy
Note: See TracChangeset
for help on using the changeset viewer.