AdvancedCustomFields / AdvancedCustomFields/acf

FR enqueue_assets when registering blocks should only enqueue when the block is actually used

Open
#624 0 comments 0 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

I'm not sure if this is new or somehow I missed it, but when using the enqueue_assets I assumed it was only enqueuing those assets when the block was used. I'm going to have to test enqueuing in the block callback instead or some version of on-demand CSS. I just wanted to bring attention to this so it's either documented better or changed. Thanks yall!

Edit: Somewhat related https://github.com/AdvancedCustomFields/acf/issues/178

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

Review the block-registration path involving enqueue_assets and compare the reported behavior with related issue #178. Determine whether the intended outcome is clearer documentation or changing when assets are enqueued; done means the chosen behavior is explicitly defined and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.