- Timestamp:
- 07/29/2024 11:08:18 AM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/interactivity-api/class-wp-interactivity-api.php
r58729 r58825 495 495 * @since 6.6.0 The function now adds a warning when the namespace is null, falsy, or the directive value is empty. 496 496 * @since 6.6.0 Removed `default_namespace` and `context` arguments. 497 * @since 6.6.0 Add support for derived state. 497 498 * 498 499 * @param string|true $directive_value The directive attribute value string or `true` when it's a boolean attribute. … … 531 532 return null; 532 533 } 533 } 534 535 if ( $current instanceof Closure ) {536 /*537 * This state getter's namespace is added to the stack so that538 * `state()` or `get_config()` read that namespace when called539 * without specifying one.540 */541 array_push( $this->namespace_stack, $ns );542 try {543 $current = $current();544 } catch ( Throwable $e ) {545 _doing_it_wrong(546 __METHOD__,547 sprintf(548 /* translators: 1: Path pointing to an Interactivity API state property, 2: Namespace for an Interactivity API store. */549 __( 'Uncaught error executing a derived state callback with path "%1$s" and namespace "%2$s".' ),550 $path,551 $ns552 ),553 '6.6.0'554 );555 return null;556 } finally {557 // Remove the property's namespace from the stack.558 array_pop( $this->namespace_stack );534 535 if ( $current instanceof Closure ) { 536 /* 537 * This state getter's namespace is added to the stack so that 538 * `state()` or `get_config()` read that namespace when called 539 * without specifying one. 540 */ 541 array_push( $this->namespace_stack, $ns ); 542 try { 543 $current = $current(); 544 } catch ( Throwable $e ) { 545 _doing_it_wrong( 546 __METHOD__, 547 sprintf( 548 /* translators: 1: Path pointing to an Interactivity API state property, 2: Namespace for an Interactivity API store. */ 549 __( 'Uncaught error executing a derived state callback with path "%1$s" and namespace "%2$s".' ), 550 $path, 551 $ns 552 ), 553 '6.6.0' 554 ); 555 return null; 556 } finally { 557 // Remove the property's namespace from the stack. 558 array_pop( $this->namespace_stack ); 559 } 559 560 } 560 561 }
Note: See TracChangeset
for help on using the changeset viewer.