Skip to content

Commit

Permalink
🩹 Add missing classes for full_height and align_content (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
Log1x authored Feb 3, 2025
1 parent 5dc5cd7 commit 5fe0cee
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,20 @@ public function getClasses(): string
{
$supports = $this->getHtmlAttributes();

$class = $supports['class'] ?? '';

if ($alignContent = $this->block->alignContent ?? $this->block->align_content ?? null) {
$class = "{$class} is-position-{$alignContent}";
}

if ($this->block->fullHeight ?? $this->block->full_height ?? null) {
$class = "{$class} full-height";
}

return str_replace(
acf_slugify($this->namespace),
$this->slug,
$supports['class'] ?? ''
trim($class)
);
}

Expand Down

0 comments on commit 5fe0cee

Please sign in to comment.