Conversation
supportmy environment -Apache/2.4.18 (Win32) OpenSSL/1.0.2e -PHP/7.0.6 -10.1.13-MariaDB i think this code maek a bug $time = (isset($arr['time_span']) && $arr['time_span'] != "FOREVER" ) ? " AND TIMEDIFF(NOW(), post_date) < '".$arr['time_span']."'" : ""; TIMEDIFF is return in format ‘1:00:00’ and you use this to compare with number like ‘1:00:00’ < ‘720’. i think you should use this code instead ( add HOUR function before compare) $time = (isset($arr['time_span']) && $arr['time_span'] != "FOREVER" ) ? " AND HOUR(TIMEDIFF(NOW(), post_date)) < '".$arr['time_span']."'" : ""; https://wordpress.org/plugins/bainternet-posts-creation-limits/
work with this code? $time = (isset($arr['time_span']) && $arr['time_span'] != "FOREVER" ) ? " AND HOUR(TIMEDIFF(NOW(), post_date)) < '".$arr['time_span']."'" : "";
work with this code? $time = (isset($arr['time_span']) && $arr['time_span'] != "FOREVER" ) ? " AND HOUR(TIMEDIFF(NOW(), post_date)) < '".$arr['time_span']."'" : "";