mirror of
https://github.com/10h30/wp-strava.git
synced 2026-07-15 20:53:49 +09:00
Merge branch 'main' into feature/73-som-component
This commit is contained in:
@@ -112,6 +112,11 @@ On the WP-Strava settings page you cannot currently remove and add another athle
|
||||
|
||||
== Changelog ==
|
||||
|
||||
|
||||
= Unreleased =
|
||||
|
||||
Fix latest_map class replacing echo with return https://wordpress.org/support/topic/latest-activity-map-shortcode-wrong-placed-on-page/
|
||||
|
||||
= 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
|
||||
|
||||
@@ -1,7 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* LatestMap class
|
||||
*
|
||||
* @since 2.1.0
|
||||
*/
|
||||
class WPStrava_LatestMap {
|
||||
|
||||
/**
|
||||
* Returns Latest Map HTML.
|
||||
*
|
||||
* @param array $args
|
||||
* @return string HTML with static map image.
|
||||
* @author Justin Foell <justin@foell.org>
|
||||
* @since 2.1.0
|
||||
*/
|
||||
public static function get_map_html( $args ) {
|
||||
$defaults = array(
|
||||
'client_id' => WPStrava::get_instance()->settings->get_default_id(),
|
||||
@@ -35,7 +48,7 @@ class WPStrava_LatestMap {
|
||||
|
||||
$activity = current( $activities );
|
||||
|
||||
echo empty( $activity->map ) ?
|
||||
return empty( $activity->map ) ?
|
||||
// Translators: Text with activity name shown in place of image if not available.
|
||||
esc_html( sprintf( __( 'Map not available for activity "%s"', 'wp-strava' ), $activity->name ) ) :
|
||||
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped -- Image OK.
|
||||
|
||||
Reference in New Issue
Block a user