FIX: "When an image is used for a performance, the image is not displayed on player lists and players page"

This commit is contained in:
savvasha
2019-07-26 12:18:52 +03:00
parent 5d8f754e59
commit 856fbf8a34
2 changed files with 21 additions and 6 deletions

View File

@@ -229,9 +229,14 @@ class SP_Player_List extends SP_Secondary_Post {
if ( get_option( 'sportspress_player_statistics_mode', 'values' ) == 'icons' && ( $stat->post_type == 'sp_performance' || $stat->post_type == 'sp_statistic' ) ) {
$icon = apply_filters( 'sportspress_event_performance_icons', '', $stat->ID, 1 );
if ( $icon != '' ) {
$columns[ $stat->post_name ] = apply_filters( 'sportspress_event_performance_icons', '', $stat->ID, 1 );
$columns[ $stat->post_name ] = $icon;
}else{
$columns[ $stat->post_name ] = $stat->post_title;
if ( has_post_thumbnail( $stat ) ) {
$icon = get_the_post_thumbnail( $stat, 'sportspress-fit-mini', array( 'title' => sp_get_singular_name( $stat ) ) );
$columns[ $stat->post_name ] = apply_filters( 'sportspress_event_performance_icons', $icon, $stat->ID, 1 );
}else{
$columns[ $stat->post_name ] = $stat->post_title;
}
}
}else{
$columns[ $stat->post_name ] = $stat->post_title;

View File

@@ -175,9 +175,14 @@ 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 != '' ) {
$performance_labels[ $post->post_name ] = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 );
$performance_labels[ $post->post_name ] = $icon;
}else{
$performance_labels[ $post->post_name ] = $post->post_title;
if ( has_post_thumbnail( $post ) ) {
$icon = get_the_post_thumbnail( $post, 'sportspress-fit-mini', array( 'title' => sp_get_singular_name( $post ) ) );
$performance_labels[ $post->post_name ] = apply_filters( 'sportspress_event_performance_icons', $icon, $post->ID, 1 );
}else{
$performance_labels[ $post->post_name ] = $post->post_title;
}
}
}else{
$performance_labels[ $post->post_name ] = $post->post_title;
@@ -193,9 +198,14 @@ 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 != '' ) {
$performance_labels[ $post->post_name ] = apply_filters( 'sportspress_event_performance_icons', '', $post->ID, 1 );
$performance_labels[ $post->post_name ] = $icon;
}else{
$performance_labels[ $post->post_name ] = $post->post_title;
if ( has_post_thumbnail( $post ) ) {
$icon = get_the_post_thumbnail( $post, 'sportspress-fit-mini', array( 'title' => sp_get_singular_name( $post ) ) );
$performance_labels[ $post->post_name ] = apply_filters( 'sportspress_event_performance_icons', $icon, $post->ID, 1 );
}else{
$performance_labels[ $post->post_name ] = $post->post_title;
}
}
}else{
$performance_labels[ $post->post_name ] = $post->post_title;