From 3f9ac2b94d67649513834aa3f61e0b7c9357c539 Mon Sep 17 00:00:00 2001 From: savvasha Date: Fri, 23 Aug 2019 16:39:59 +0300 Subject: [PATCH] Optimize code --- includes/class-sp-player.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/class-sp-player.php b/includes/class-sp-player.php index 60042072..ad297298 100644 --- a/includes/class-sp-player.php +++ b/includes/class-sp-player.php @@ -587,7 +587,7 @@ class SP_Player extends SP_Custom_Post { if ( get_option( 'sportspress_player_statistics_mode', 'values' ) == 'icons' ) { $icon = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ); if ( $icon != '' ) { - $stats[ $post->post_name ] = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ); + $stats[ $post->post_name ] = $icon; }else{ $stats[ $post->post_name ] = $post->post_title; } @@ -607,7 +607,7 @@ class SP_Player extends SP_Custom_Post { if ( get_option( 'sportspress_player_statistics_mode', 'values' ) == 'icons' ) { $icon = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ); if ( $icon != '' ) { - $stats[ $post->post_name ] = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ); + $stats[ $post->post_name ] = $icon; } else { $stats[ $post->post_name ] = $post->post_title; } @@ -620,7 +620,7 @@ class SP_Player extends SP_Custom_Post { if ( get_option( 'sportspress_player_statistics_mode', 'values' ) == 'icons' ) { $icon = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ); if ( $icon != '' ) { - $stats[ $post->post_name ] = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ); + $stats[ $post->post_name ] = $icon; } else { $stats[ $post->post_name ] = $post->post_title; } @@ -633,7 +633,7 @@ class SP_Player extends SP_Custom_Post { if ( get_option( 'sportspress_player_statistics_mode', 'values' ) == 'icons' ) { $icon = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ); if ( $icon != '' ) { - $stats[ $post->post_name ] = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ); + $stats[ $post->post_name ] = $icon; }else{ $stats[ $post->post_name ] = $post->post_title; }