Skip to content

Commit

Permalink
Include arrows in links
Browse files Browse the repository at this point in the history
  • Loading branch information
Takshil-Kunadia committed Nov 29, 2024
1 parent 738d5bf commit 87e31d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/block-library/src/post-navigation-link/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,12 @@ function render_block_core_post_navigation_link( $attributes, $content ) {
$arrow = $arrow_map[ $attributes['arrow'] ][ $navigation_type ];

if ( 'next' === $navigation_type ) {
$format = '%link<span class="wp-block-post-navigation-link__arrow-next is-arrow-' . $attributes['arrow'] . '" aria-hidden="true">' . $arrow . '</span>';
$arrow_markup = '<span class="wp-block-post-navigation-link__arrow-next is-arrow-' . $attributes['arrow'] . '" aria-hidden="true">' . $arrow . '</span>';
} else {
$format = '<span class="wp-block-post-navigation-link__arrow-previous is-arrow-' . $attributes['arrow'] . '" aria-hidden="true">' . $arrow . '</span>%link';
$arrow_markup = '<span class="wp-block-post-navigation-link__arrow-previous is-arrow-' . $attributes['arrow'] . '" aria-hidden="true">' . $arrow . '</span>';
}

$link = 'next' === $navigation_type ? $link . $arrow_markup : $arrow_markup . $link;
}

/*
Expand Down

0 comments on commit 87e31d1

Please sign in to comment.