Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('jnews_view_counter_query_where', 'j_custom_popular_weekly', 99 , 2);
- function j_custom_popular_weekly($where , $instance){
- $week = 1; /* Total Week */
- $days = $week * 7;
- $now = current_time('mysql');
- $from_dt = gmdate('Y-m-d H:i:s', strtotime($now . " -{$days} days"));
- $where .= " AND p.post_date BETWEEN '{$from_dt}' AND '{$now}'";
- return $where;
- }
Advertisement
Add Comment
Please, Sign In to add comment