Skip to content

Commit

Permalink
fix: alignment for elements using textAlign (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefferson Rabb committed Jan 5, 2021
1 parent 0d18659 commit 405c33e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions includes/class-newspack-newsletters-renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ function ( $key ) use ( &$attrs ) {
$attrs['padding'] = '0';
}

if ( isset( $attrs['textAlign'] ) && ! isset( $attrs['align'] ) ) {
$attrs['align'] = $attrs['textAlign'];
unset( $attrs['textAlign'] );
}

if ( isset( $attrs['align'] ) && 'full' == $attrs['align'] ) {
$attrs['full-width'] = 'full-width';
unset( $attrs['align'] );
Expand Down

0 comments on commit 405c33e

Please sign in to comment.