-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Open
Labels
[Feature] Interactivity APIAPI to add frontend interactivity to blocks.API to add frontend interactivity to blocks.[Packages] Interactivity/packages/interactivity/packages/interactivity[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Description
What problem does this address?
For now, we haven't required a directive to render HTML conditionally. However, there are cases where it has proven to be useful, rather than using techniques like adding the attribute hidden
to those elements that shouldn't be displayed.
Related discussion for a data-wp-show
directive: #53058
What is your proposed solution?
The data-wp-if
directive implementation was delayed, waiting for the WP HTML API to support adding inner elements natively rather than relying on the iAPI's custom logic. We could keep waiting for this feature to be implemented or make the necessary changes to WP_Interactivity_API_Directives_Processor
to support this directive.
justintadlocksethrubenstein
Metadata
Metadata
Assignees
Labels
[Feature] Interactivity APIAPI to add frontend interactivity to blocks.API to add frontend interactivity to blocks.[Packages] Interactivity/packages/interactivity/packages/interactivity[Type] EnhancementA suggestion for improvement.A suggestion for improvement.