Adding a parameter
This commit is contained in:
parent
f4d3c983e7
commit
37c790d36b
|
|
@ -3,6 +3,14 @@
|
|||
* @see https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/block-api/block-metadata.md#render
|
||||
*/
|
||||
?>
|
||||
<p <?php echo get_block_wrapper_attributes(); ?>>
|
||||
<?php esc_html_e( 'Attached GPXes – hello from a dynamic block!', 'wp-attached-gpx' ); ?>
|
||||
</p>
|
||||
<div class="attached-gpxes" <?php echo get_block_wrapper_attributes(); ?>>
|
||||
<?php
|
||||
$gpxes = get_attached_media('application/gpx+xml');
|
||||
foreach ($gpxes as $id => $gpx) {
|
||||
$url = wp_get_attachment_url($id);
|
||||
echo '<div class="attached-gpx">'.wpgpxmaps_handle_shortcodes(['gpx'=>$url, 'attachments'=>true]).'</div>';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,14 @@
|
|||
* @see https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/block-api/block-metadata.md#render
|
||||
*/
|
||||
?>
|
||||
<p <?php echo get_block_wrapper_attributes(); ?>>
|
||||
<?php esc_html_e( 'Attached GPXes – hello from a dynamic block!', 'wp-attached-gpx' ); ?>
|
||||
</p>
|
||||
<div class="attached-gpxes" <?php echo get_block_wrapper_attributes(); ?>>
|
||||
<?php
|
||||
$gpxes = get_attached_media('application/gpx+xml');
|
||||
foreach ($gpxes as $id => $gpx) {
|
||||
$url = wp_get_attachment_url($id);
|
||||
echo '<div class="attached-gpx">'.wpgpxmaps_handle_shortcodes(['gpx'=>$url, 'attachments'=>true]).'</div>';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue