Optimize code
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user