Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backwards compatibility for attributes #316

Closed
ouun opened this issue Jan 23, 2025 · 1 comment · Fixed by #317
Closed

Backwards compatibility for attributes #316

ouun opened this issue Jan 23, 2025 · 1 comment · Fixed by #317

Comments

@ouun
Copy link
Contributor

ouun commented Jan 23, 2025

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.

@Log1x
Copy link
Owner

Log1x commented Jan 23, 2025

appreciate you testing this. i figured there was definitely a bug or two, wasn't confident in a release yet. 🙈

should be an easy fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants