Opened 22 months ago
Last modified 6 months ago
#58346 new enhancement
A way for adding inline dynamic data
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
As the latest changes in 6.2.1 single, shortcodes might be slowly deprecated. Currently, shortcodes are the only way (that I'm aware of) for adding inline dynamic data (such as ACF field value) to block templates. I believe it is an essential functionality, that if deprecated, together with shortcodes, would leave a big functional gap.
If the intention is indeed to eventually deprecate shortcodes, I believe an alternative for adding inline dynamic data should be introduced before it happens.
Change History (3)
This ticket was mentioned in Slack in #core by nekojonez. View the logs.
22 months ago
#3
@
6 months ago
I believe a lot of this may be getting handled via the Block Bindings API. https://make.wordpress.org/core/2024/03/06/new-feature-the-block-bindings-api/
A more specific aspect that might be considered is shortcodes inside block attributes. For example, I use a Yoast FAQ block and ACF fields in a Single Product block template. Yoast puts the question and answers (that is, the ACF shortcodes) in the block attributes. These shortcodes are never parsed, and custom code is required to do so. (Or creating my own custom FAQ block, which feels redundant).
If templates aren't fully dynamic, they are kind of missing their purpose.