Optimize code

This commit is contained in:
savvasha
2019-08-23 16:39:59 +03:00
parent ee2fcf2fea
commit 3f9ac2b94d

View File

@@ -587,7 +587,7 @@ class SP_Player extends SP_Custom_Post {
if ( get_option( 'sportspress_player_statistics_mode', 'values' ) == 'icons' ) { if ( get_option( 'sportspress_player_statistics_mode', 'values' ) == 'icons' ) {
$icon = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ); $icon = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 );
if ( $icon != '' ) { if ( $icon != '' ) {
$stats[ $post->post_name ] = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ); $stats[ $post->post_name ] = $icon;
}else{ }else{
$stats[ $post->post_name ] = $post->post_title; $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' ) { if ( get_option( 'sportspress_player_statistics_mode', 'values' ) == 'icons' ) {
$icon = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ); $icon = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 );
if ( $icon != '' ) { if ( $icon != '' ) {
$stats[ $post->post_name ] = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ); $stats[ $post->post_name ] = $icon;
} else { } else {
$stats[ $post->post_name ] = $post->post_title; $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' ) { if ( get_option( 'sportspress_player_statistics_mode', 'values' ) == 'icons' ) {
$icon = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ); $icon = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 );
if ( $icon != '' ) { if ( $icon != '' ) {
$stats[ $post->post_name ] = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ); $stats[ $post->post_name ] = $icon;
} else { } else {
$stats[ $post->post_name ] = $post->post_title; $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' ) { if ( get_option( 'sportspress_player_statistics_mode', 'values' ) == 'icons' ) {
$icon = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ); $icon = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 );
if ( $icon != '' ) { if ( $icon != '' ) {
$stats[ $post->post_name ] = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 ); $stats[ $post->post_name ] = $icon;
}else{ }else{
$stats[ $post->post_name ] = $post->post_title; $stats[ $post->post_name ] = $post->post_title;
} }