Skip to content

Commit 5c77ea5

Browse files
authored
Merge pull request #20 from afragen/fix-forever
fix `forever` option
2 parents b2b1e0f + ad28a31 commit 5c77ea5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#### 1.4.1
2+
* fixed the `forever` setting with options
3+
14
#### 1.4.0
25
* WPCS 1.1.0 linting done
36
* switched from storing timeout in transients to storing in the options table, this should play much better with object caching

persist-admin-notices-dismissal.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* @author Collins Agbonghama
2323
* @author Andy Fragen
2424
* @license http://www.gnu.org/licenses GNU General Public License
25-
* @version 1.4.0
25+
* @version 1.4.1
2626
*/
2727

2828
/**
@@ -129,6 +129,7 @@ public static function get_admin_notice_cache( $id = false ) {
129129
}
130130
$cache_key = 'pand-' . md5( $id );
131131
$timeout = get_site_option( $cache_key );
132+
$timeout = 'forever' === $timeout ? time() + 60 : $timeout;
132133

133134
if ( empty( $timeout ) || time() > $timeout ) {
134135
return false;

0 commit comments

Comments
 (0)