WordPress/wp-includes/interactivity-api
Pascal Birchler dede0d6b09 Interactivity API: Do not print state if it’s an empty array.
This prunes stores and configurations that are empty arrays, as stores are expected to be JSON objects.
By not printing empty configurations, less redundant data is serialized into the HTML.

Reviewed by gziolo.
Merges [57841] to the to the 6.5 branch.

Props jonsurrell, luisherranz, darerodz, gziolo, swissspidy.
Fixes #60761.
Built from https://develop.svn.wordpress.org/branches/6.5@57843


git-svn-id: http://core.svn.wordpress.org/branches/6.5@57344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-15 14:59:08 +00:00
..
class-wp-interactivity-api-directives-processor.php Interactivity API: Skip instead of bail out if HTML contains SVG or MATH. 2024-02-17 15:28:04 +00:00
class-wp-interactivity-api.php Interactivity API: Do not print state if it’s an empty array. 2024-03-15 14:59:08 +00:00
interactivity-api.php Interactivity API: Increase hook priority for processing directives. 2024-03-14 08:59:13 +00:00