FIX: "When an image is used for a statistic, the image is not displayed on player lists and players pages
This commit is contained in:
@@ -588,9 +588,14 @@ class SP_Player extends SP_Custom_Post {
|
|||||||
$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 ] = $icon;
|
$stats[ $post->post_name ] = $icon;
|
||||||
|
}else{
|
||||||
|
if ( has_post_thumbnail( $post ) ) {
|
||||||
|
$icon = get_the_post_thumbnail( $post, 'sportspress-fit-mini', array( 'title' => sp_get_singular_name( $post ) ) );
|
||||||
|
$stats[ $post->post_name ] = apply_filters( 'sportspress_event_performance_icons', $icon, $post->ID, 1 );
|
||||||
}else{
|
}else{
|
||||||
$stats[ $post->post_name ] = $post->post_title;
|
$stats[ $post->post_name ] = $post->post_title;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
$stats[ $post->post_name ] = $post->post_title;
|
$stats[ $post->post_name ] = $post->post_title;
|
||||||
}
|
}
|
||||||
@@ -608,9 +613,14 @@ class SP_Player extends SP_Custom_Post {
|
|||||||
$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 ] = $icon;
|
$stats[ $post->post_name ] = $icon;
|
||||||
} else {
|
}else{
|
||||||
|
if ( has_post_thumbnail( $post ) ) {
|
||||||
|
$icon = get_the_post_thumbnail( $post, 'sportspress-fit-mini', array( 'title' => sp_get_singular_name( $post ) ) );
|
||||||
|
$stats[ $post->post_name ] = apply_filters( 'sportspress_event_performance_icons', $icon, $post->ID, 1 );
|
||||||
|
}else{
|
||||||
$stats[ $post->post_name ] = $post->post_title;
|
$stats[ $post->post_name ] = $post->post_title;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$stats[ $post->post_name ] = $post->post_title;
|
$stats[ $post->post_name ] = $post->post_title;
|
||||||
}
|
}
|
||||||
@@ -621,9 +631,14 @@ class SP_Player extends SP_Custom_Post {
|
|||||||
$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 ] = $icon;
|
$stats[ $post->post_name ] = $icon;
|
||||||
} else {
|
}else{
|
||||||
|
if ( has_post_thumbnail( $post ) ) {
|
||||||
|
$icon = get_the_post_thumbnail( $post, 'sportspress-fit-mini', array( 'title' => sp_get_singular_name( $post ) ) );
|
||||||
|
$stats[ $post->post_name ] = apply_filters( 'sportspress_event_performance_icons', $icon, $post->ID, 1 );
|
||||||
|
}else{
|
||||||
$stats[ $post->post_name ] = $post->post_title;
|
$stats[ $post->post_name ] = $post->post_title;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$stats[ $post->post_name ] = $post->post_title;
|
$stats[ $post->post_name ] = $post->post_title;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user