Skip to content

Commit

Permalink
Post navigation link: Fix the writing mode setting on the front. (#54053
Browse files Browse the repository at this point in the history
)

Add style attributes to the wrapper in the index.php file
  • Loading branch information
carolinan authored Aug 31, 2023
1 parent d67a8d5 commit 3db444b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/block-library/src/post-navigation-link/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,16 @@ function render_block_core_post_navigation_link( $attributes, $content ) {
if ( isset( $attributes['textAlign'] ) ) {
$classes .= " has-text-align-{$attributes['textAlign']}";
}
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
$styles = '';
if ( isset( $attributes['style']['typography']['writingMode'] ) ) {
$styles = "writing-mode:{$attributes['style']['typography']['writingMode']};";
}
$wrapper_attributes = get_block_wrapper_attributes(
array(
'class' => $classes,
'style' => $styles,
)
);
// Set default values.
$format = '%link';
$link = 'next' === $navigation_type ? _x( 'Next', 'label for next post link' ) : _x( 'Previous', 'label for previous post link' );
Expand Down

0 comments on commit 3db444b

Please sign in to comment.