Fix view counter
This commit is contained in:
@@ -294,7 +294,7 @@ if ( !function_exists( 'sp_get_post_views' ) ) {
|
|||||||
delete_post_meta( $post_id, $count_key );
|
delete_post_meta( $post_id, $count_key );
|
||||||
add_post_meta( $post_id, $count_key, '0' );
|
add_post_meta( $post_id, $count_key, '0' );
|
||||||
endif;
|
endif;
|
||||||
if ( isset( $views ) && $views == 1 )
|
if ( $count == 1 )
|
||||||
return __( '1 view', 'sportspress' );
|
return __( '1 view', 'sportspress' );
|
||||||
else
|
else
|
||||||
return sprintf( __( '%s views', 'sportspress' ), $count );
|
return sprintf( __( '%s views', 'sportspress' ), $count );
|
||||||
|
|||||||
Reference in New Issue
Block a user