2014-10-24, 09:52 PM
(This post was last modified: 2014-10-24, 09:54 PM by dragonexpert.)
I'm not 100% sure if this line is ok in that PHP version:
I really would say to use the constant TIME_NOW instead of using time() in the if statement. If that doesn't fix it, I'll look more into it.
@jung30: You really should use the _activate function to add templates instead of the_install function because if someone needs to disable the plugin by deactivating it and then wants to reactivate it, they will need to uninstall it first with how your code is written. _install should be reserved for database changes. Since your plugin doesn't add any database fields or tables, it is not necessary to use the _is_installed function.
if($userlastview && $timelimit > time()) {
I really would say to use the constant TIME_NOW instead of using time() in the if statement. If that doesn't fix it, I'll look more into it.
@jung30: You really should use the _activate function to add templates instead of the_install function because if someone needs to disable the plugin by deactivating it and then wants to reactivate it, they will need to uninstall it first with how your code is written. _install should be reserved for database changes. Since your plugin doesn't add any database fields or tables, it is not necessary to use the _is_installed function.