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: {{{ <div data-wp-bind--hidden="!state.missing.property"> This should be hidden by the <code>hidden</code> attribute. </div> }}} Both server and client will return with this fix: {{{ <div data-wp-bind--hidden="!state.missing.property" hidden=""> This should be hidden by the <code>hidden</code> attribute. </div> }}} 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
This commit is contained in:
parent
7d29e45bbe
commit
664c3049d1
|
@ -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 ) {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue