/** * Returns page views for a post. * * @param int $post_id The post ID. * @param string $type (optional) Return total or daily page views. * * @return int Quantity of post views. */ function appthemes_get_stats_by($post_id, $type = 'total') { if (!current_theme_supports('app-stats')) { return false; } return APP_Post_Statistics::get_stats_by($post_id, $type); }