Skip to content

Backwards compatibility for attributes #316

@ouun

Description

@ouun

Hi @Log1x,

while I tested PR 315 I also worked with your latest commits.
There seems to be an issue right now with the $align_text param. The css classes are not outputted as required.

    /**
     * The default block text alignment.
     *
     * @var string
     */
    public $align_text = 'center';

I checked the docs and realized that for setting the default value it requires something like this:

$block['attributes']['style'] =  [
      'type' => 'object',
      'default' => [
          'typography' => [
              'textAlign' => $this->align_text,
          ],
      ],
  ];

I am not able to deep-dive into this right now, however I hope it is of any help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions