diff --git a/src/Block.php b/src/Block.php index c82f58b..dd0b29a 100644 --- a/src/Block.php +++ b/src/Block.php @@ -197,6 +197,13 @@ abstract class Block extends Composer implements BlockContract */ public $align_content = ''; + /** + * The default block layout. + * + * @var array + */ + public $layout = []; + /** * The default block spacing. * @@ -452,6 +459,13 @@ public function getSupportAttributes(): array ]; } + if ($this->layout) { + $attributes['layout'] = [ + 'type' => 'object', + 'default' => $this->layout, + ]; + } + return $attributes; } @@ -661,6 +675,7 @@ public function settings(): Collection 'attributes' => $this->getSupportAttributes(), 'alignText' => $this->align_text ?? $this->align, 'alignContent' => $this->align_content, + 'layout' => $this->layout, 'styles' => $this->getStyles(), 'supports' => $this->getSupports(), 'textdomain' => $this->getTextDomain(),