From c577c10992f1968a8a94ad755b8f3fe2d8101da2 Mon Sep 17 00:00:00 2001 From: Justin Foell <630830+jrfoell@users.noreply.github.com> Date: Fri, 27 Nov 2020 11:55:59 -0600 Subject: [PATCH] Add description under image --- readme.txt | 1 + src/WPStrava/ActivityRenderer.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/readme.txt b/readme.txt index dcde601..401e457 100755 --- a/readme.txt +++ b/readme.txt @@ -119,6 +119,7 @@ On the WP-Strava settings page you cannot currently remove and add another athle = 2.5.0 = Fix missing translation domain on "Save Changes" in settings. https://wordpress.org/support/topic/small-fix-in-settings-php-function-print_clear_input Refined styles for responsive tables https://wordpress.org/support/topic/responsive-strava-activity-table/ +Add description under image (if set) https://wordpress.org/support/topic/show-activity-description/ = 2.4.0 = diff --git a/src/WPStrava/ActivityRenderer.php b/src/WPStrava/ActivityRenderer.php index 3ee825c..100b932 100644 --- a/src/WPStrava/ActivityRenderer.php +++ b/src/WPStrava/ActivityRenderer.php @@ -59,6 +59,10 @@ class WPStrava_ActivityRenderer { $activity_details->name ); + if ( ! empty( $activity_details->description ) ) { + $activity_output .= '
' . esc_html( $activity_details->description ) . '
'; + } + $activity_output .= ''; } // End if( $activity_details ). return $activity_output;