Skip to content

Commit

Permalink
use absolute URLs in the links
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmaguitar committed Oct 8, 2024
1 parent 8442117 commit 4757419
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions plugins/interactivity-router-2f43f8/src/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* @package block-development-examples
*/

$base_url = get_site_url();
?>
<div
<?php echo wp_kses_data( get_block_wrapper_attributes() ); ?>
Expand All @@ -27,13 +28,13 @@
<?php if ( isset( $attributes['prev'] ) ) : ?>
<a
data-wp-on--click="actions.navigate"
href="<?php echo esc_attr( $attributes['prev'] ); ?>"
href="<?php echo esc_url( $base_url . esc_attr( $attributes['prev'] ) ); ?>"
>&lt; Prev</a>
<?php endif; ?>
<?php if ( isset( $attributes['next'] ) ) : ?>
<a
data-wp-on--click="actions.navigate"
href="<?php echo esc_attr( $attributes['next'] ); ?>"
href="<?php echo esc_url( $base_url . esc_attr( $attributes['next'] ) ); ?>"
>Next &gt;</a>
<?php endif; ?>
</nav>
Expand All @@ -42,10 +43,7 @@
<p>block (region in display) attributes: <code style="text-align: left;">
<?php echo wp_json_encode( $attributes ); ?>
</code></p>

<p>state.urlRegionDisplay: <code data-wp-text="state.urlRegionDisplay"></code></p>


</div>


Expand Down

0 comments on commit 4757419

Please sign in to comment.