Skip to content

Commit

Permalink
KAD-3146 CSS classes not being applied to off canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
oakesjosh committed Aug 8, 2024
1 parent 8b04879 commit 8457196
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions includes/blocks/header/class-kadence-blocks-off-canvas-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,13 @@ public function build_html( $attributes, $unique_id, $content, $block_instance )
'kb-off-canvas-overlay' . $unique_id,
);

$html .= '<div class="' . esc_attr( implode( ' ', $classes ) ) . '">';
$html .= $icon;
$html .= '<div class="kb-off-canvas-inner">';
$html .= $content;
$html .= '</div>';
$html .= '</div>';

$wrapper_args = array(
'class' => implode( ' ', $classes ),
);
$wrapper_attributes = get_block_wrapper_attributes( $wrapper_args );

$html .= sprintf( '<div %1$s>%2$s<div class="kb-off-canvas-inner">%3$s</div></div>', $wrapper_attributes, $icon, $content );

if ( empty( $attributes['widthType'] ) || $attributes['widthType'] === 'partial' ) {
$html .= '<div data-unique-id="' . esc_attr( $unique_id ) . '" class="' . esc_attr( implode( ' ', $overlay_classes ) ) . '"></div>';
Expand Down

0 comments on commit 8457196

Please sign in to comment.