Get Posts updated or published within the last x hours

here is a shorter version that assumes the GET parameter ?time=[integer] (for example ?time=8) add_filter(‘posts_where’, ‘filter_where’, 11); function filter_where($where=””) { if(isset($_GET[‘time’])){ $time = $_GET[‘time’]; $time=(int)$time; // only allow integers if(in_array($time,array(8,24,72))){ $where .= ” AND post_date > ‘”.date(‘Y-m-d H:i:s’, strtotime(‘-“.$time.” hours’)).”‘”; } } return $where; }

how to use force_filtered_html_on_import in add_filter?

The solution that I’ve found is to add this line just before doing the import: if (function_exists(‘kses_remove_filters’)) { kses_remove_filters(); } That will disable the kses filters responsible for stripping HTML tag inside the post_content. I have successfully added this to the first plugin. Once this is disabled, it seems that when the import call to … Read more