Skip to content

Commit

Permalink
KAD-2819 Formatting tablet view center column
Browse files Browse the repository at this point in the history
  • Loading branch information
oakesjosh committed Jul 3, 2024
1 parent 1102402 commit 6e64d81
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ public function build_css( $attributes, $css, $unique_id, $unique_style_id ) {
*/
public function build_html( $attributes, $unique_id, $content, $block_instance ) {
if ( ! empty( $attributes['location'] ) && ! in_array( $attributes['location'], array( 'tablet-left', 'tablet-right', 'center-left', 'center', 'center-right' ) ) ) {

// If no center content, return empty div to keep layout consistent.
if( $attributes['location'] === 'tablet-center' && empty( $content ) ) {
return '<div></div>';
}

return $content;
}

Expand Down

0 comments on commit 6e64d81

Please sign in to comment.