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

Align and SupportsAlign have no effect #24

Open
gscr opened this issue Aug 19, 2019 · 6 comments
Open

Align and SupportsAlign have no effect #24

gscr opened this issue Aug 19, 2019 · 6 comments

Comments

@gscr
Copy link

gscr commented Aug 19, 2019

My custom blocks load and save but it seems like the Align and SupportsAlign options have no effect. I am new to gutenberg but am I right in saying SupportsAlign: false should disable the alignment options in the block editor?

luukskeur pushed a commit to luukskeur/sage-acf-wp-blocks that referenced this issue Sep 2, 2019
Also added is_preview class to the block classes
@bebjakub
Copy link
Contributor

@MWDelaney could you create a new package release for include those changes? Thank you!

@luukskeur
Copy link
Contributor

@bebjakub This is already added to the core files with this PR: #26.

This issue can be closed.

@bebjakub
Copy link
Contributor

@luukskeur thanks. I see now. I'll require dev-master

@tedw
Copy link

tedw commented Apr 30, 2020

FYI SupportsAlign: false isn’t having any effect for me in WP v5.4.1

{{--
  Title: Example block
  Category: mycategory
  Icon: align-right
  Keywords: example
  Mode: auto
  PostTypes: page post custom-post-type
  SupportsAlign: false
  SupportsMultiple: true
--}}

I’ve enabled “wide” and “full” alignments using add_theme_support('align-wide'); but removing that doesn’t seem to make a difference.

This isn’t a major issue for me, just wanted to mention it in case it’s an easy fix. Thanks so much for your work on this plugin, it’s great!

@bebjakub
Copy link
Contributor

Hi, SupportsAlign: false should just hide align options in the block... for more info refer to acf_register_block_type

@intelligence
Copy link

Noticed that if I set:

Align: full
SupportsAlign: false

It won't show the block as full width


But if I set:

Align: full
SupportsAlign: full

It shows the block full width (and the align toggle is shown, with full as the only option)

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

No branches or pull requests

5 participants