From de988777bd53753a14ca3d481e515ee48513712c Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Tue, 6 May 2014 17:21:06 +1000 Subject: [PATCH] Fix view counter --- includes/sp-core-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/sp-core-functions.php b/includes/sp-core-functions.php index 5db0394a..00baf86d 100644 --- a/includes/sp-core-functions.php +++ b/includes/sp-core-functions.php @@ -294,7 +294,7 @@ if ( !function_exists( 'sp_get_post_views' ) ) { delete_post_meta( $post_id, $count_key ); add_post_meta( $post_id, $count_key, '0' ); endif; - if ( isset( $views ) && $views == 1 ) + if ( $count == 1 ) return __( '1 view', 'sportspress' ); else return sprintf( __( '%s views', 'sportspress' ), $count );