AdvancedCustomFields / AdvancedCustomFields/acf
acf_prepare_block className removed
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
In 5.11 it seems that the following code has been removed from in pro > blocks.php > acf_prepare_blocks()
// Replace className with wpClassName if it's set. This enables support for blocks API v2 filters.
if ( isset( $block['wpClassName'] ) ) {
$block['className'] = $block['wpClassName'];
unset( $block['wpClassName'] );
}
We've seen this causing issues on a few sites. Looks like a breaking change that should have been mentioned in update and the documentation?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pro/blocks.php at acf_prepare_blocks() and compare the 5.11 behavior with the code shown in the issue. Reproduce the reported className/wpClassName problem, review the comment discussion for the expected behavior, and consider the corresponding update or documentation note; done means block class names and Blocks API v2 filters behave as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100