AdvancedCustomFields / AdvancedCustomFields/acf

Get_block_wrapper_attributes missing align class

Open
#756 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
945
Forks
197
PR merge metrics
No merged PRs in 30d

Description

This may be similar to #739, but when creating a simple ACF block test using the get_block_wrapper_attributes function in my render file, it outputs the top level class for my block name (.wp-block-cab-test), but doesn't output the wide alignment class that I've set on the block by default. It shows wide on the backend, but when I change it to alignnone, on the frontend it now outputs an extra class of just align.

Doing the same test in a custom (non-ACF) WP block outputs the align class correctly, so I wanted to see if I was missing something here or merely _doing_it_wrong.

Here's a simplified test block for reference.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the simplified ACF block test linked in the issue and its render file, then compare get_block_wrapper_attributes output with the custom non-ACF block example. Check the default wide alignment and the alignnone case; done means the frontend emits the expected alignment class in both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.