Commit 0b73981c authored by Rafael Chaves Freitas's avatar Rafael Chaves Freitas

fixed the 'from' parameter of AjaxPageviews::get_top_viewed call in...

fixed the 'from' parameter of AjaxPageviews::get_top_viewed call in get_posts_ranking function of facebook module
parent 7d33b8e7
......@@ -109,7 +109,7 @@ function get_posts_ranking() {
$ids = wp_cache_get( $cache_key );
if ( $ids === false ) {
$most_viewed = \AjaxPageviews::get_top_viewed(500, ['post_type' => 'post', 'from' => strtotime('-24 hour')]);
$most_viewed = \AjaxPageviews::get_top_viewed(500, ['post_type' => 'post', 'from' => date('Y-m-d H:00', strtotime('-24 hour'))]);
$ids = array();
foreach ( $most_viewed as $post => $value ) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment