Skip to content

Commit 931c691

Browse files
safroniksafronik
authored andcommitted
New: Function to count time interval start.
1 parent 93c52c3 commit 931c691

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Cleantalk/Antispam/Helper.php renamed to lib/Cleantalk/Common/Helper.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,4 +740,9 @@ public static function apbct_cookie__set ($name, $value = '', $expires = 0, $pat
740740
}
741741

742742
}
743+
744+
public static function time__get_interval_start( $interval = 300 ){
745+
return time() - ( ( time() - strtotime( date( 'd F Y' ) ) ) % $interval );
746+
}
747+
743748
}

0 commit comments

Comments
 (0)