Exemple #1
0
/**
 * Records page views for a post.
 *
 * @param int $post_id The post ID.
 *
 * @return bool Whether the stats get updated.
 */
function appthemes_stats_update($post_id)
{
    if (!current_theme_supports('app-stats')) {
        return false;
    }
    return APP_Post_Statistics::record_view($post_id);
}