AdvancedCustomFields / AdvancedCustomFields/acf
How can I get block object based on ID?
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm looping through some fields that are part of ACF Gutenberg blocks and I want to fetch the block object so that I can access information such as icon, title, description etc. If I know the block ID, such as block_612de94a30387 , how can I go about fetching the object? I tried to use acf_get_block_types() but none of the items in the array have an ID that I can compare against.
Any help is appreciated!
Regards,
Jonathan
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
The issue mentions ACF Gutenberg blocks, the block ID format, and acf_get_block_types(); no file or test is identified. Start by reviewing block registration and the return structure of acf_get_block_types(). Done would be a confirmed, documented way to retrieve the block metadata object from its ID.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100