Shortcode

This commit is contained in:
2026-01-29 22:21:15 +01:00
parent 87da77584f
commit a7db042d7c
2 changed files with 62 additions and 0 deletions
+23
View File
@@ -1915,6 +1915,7 @@ function mystat_shortcode_handler( $atts ) {
<th>Data</th>
<th>Tytuł</th>
<th>Kategoria</th>
<th>Dystans</th>
<th>Czas</th>
<th>Sprzęt</th>
@@ -1931,6 +1932,28 @@ function mystat_shortcode_handler( $atts ) {
<td><?php echo esc_html( $row->duration ); ?></td>
<td><?php echo esc_html( $row->equipment_name ); ?></td>
</tr>
<?php if ( $row->avg_speed || $row->avg_heart_rate || $row->avg_cadence ) : ?>
<tr class="mystats-activity-details-row">
<td colspan="6" class="mystats-activity-details-cell">
<table class="mystats-nested-details-table">
<thead>
<tr>
<?php if ($row->avg_speed) echo '<th>Śr. prędkość</th>'; ?>
<?php if ($row->avg_heart_rate) echo '<th>Śr. tętno</th>'; ?>
<?php if ($row->avg_cadence) echo '<th>Śr. kadencja</th>'; ?>
</tr>
</thead>
<tbody>
<tr>
<?php if ($row->avg_speed) echo '<td>' . number_format( $row->avg_speed, 1, ',', ' ' ) . ' km/h</td>'; ?>
<?php if ($row->avg_heart_rate) echo '<td>' . $row->avg_heart_rate . ' bpm</td>'; ?>
<?php if ($row->avg_cadence) echo '<td>' . $row->avg_cadence . ' rpm</td>'; ?>
</tr>
</tbody>
</table>
</td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
<?php else : ?>
<tr>