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

Enqueue block assets with 'enqueue_block_assets' action #315

Merged
merged 6 commits into from
Jan 27, 2025

Conversation

ouun
Copy link
Contributor

@ouun ouun commented Jan 21, 2025

Refactor assets() call to support (a) cached blocks & (b) the iframed Block Editor & Site Editor.

For more detailse see #304.

@ouun
Copy link
Contributor Author

ouun commented Jan 23, 2025

@Log1x it would be great to get your feedback on this. Do you think we could get it in a patch release? THX

@Log1x
Copy link
Owner

Log1x commented Jan 23, 2025

hey, sorry for the delay. this looks good. i think we could have the upgrade script update the assets with $block to without?

@Log1x
Copy link
Owner

Log1x commented Jan 23, 2025

i do see ACF Pro still using enqueue_block_editor_assets internally. im a little behind on this iframe vs non-iframed stuff – when are you required to use one over the other?

@ouun
Copy link
Contributor Author

ouun commented Jan 23, 2025

i do see ACF Pro still using enqueue_block_editor_assets internally. im a little behind on this iframe vs non-iframed stuff – when are you required to use one over the other?

You can see the difference for WP >6.3 here: WordPress/gutenberg#53236 (comment)

Thanks a lot as always for your support!

ouun added 2 commits January 26, 2025 22:55
As discussed, we leave it to the devs to use the hooks they need in `assets()`.
@ouun
Copy link
Contributor Author

ouun commented Jan 27, 2025

As discussed we stick with enqueue_block_assets and pass $block to assets().

@Log1x Log1x merged commit 6f95562 into Log1x:master Jan 27, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants