From 664c3049d1718a5282273b213201918b4dd660a8 Mon Sep 17 00:00:00 2001 From: cbravobernal Date: Thu, 14 Nov 2024 11:55:18 +0000 Subject: [PATCH] Interactivity API: Allow missing state negation on server Aligns on the behavior of the negation operator with directives to missing paths in client and in server. With a directive like the following: {{{
This should be hidden by the hidden attribute.
}}} Both server and client will return with this fix: {{{ }}} Reviewed by cbravobernal. Merges [59398] to the 6.7 branch. Props jonsurrell, luisherranz. Fixes #62374. Built from https://develop.svn.wordpress.org/branches/6.7@59404 git-svn-id: http://core.svn.wordpress.org/branches/6.7@58790 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/interactivity-api/class-wp-interactivity-api.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/interactivity-api/class-wp-interactivity-api.php b/wp-includes/interactivity-api/class-wp-interactivity-api.php index 75eba82c16..f71684599f 100644 --- a/wp-includes/interactivity-api/class-wp-interactivity-api.php +++ b/wp-includes/interactivity-api/class-wp-interactivity-api.php @@ -584,7 +584,8 @@ final class WP_Interactivity_API { } elseif ( is_object( $current ) && isset( $current->$path_segment ) ) { $current = $current->$path_segment; } else { - return null; + $current = null; + break; } if ( $current instanceof Closure ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 5220b61b16..61dfd70e2e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7.1-alpha-59401'; +$wp_version = '6.7.1-alpha-59404'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.