wp-includes/block-supports/states.php:26Converts internal preset references to CSS custom property references.
$valuemixedmixedfunction wp_normalize_state_preset_vars( $value ) { if ( is_array( $value ) ) { foreach ( $value as $key => $nested_value ) { $value[ $key ] = wp_normalize_state_preset_vars( $nested_value ); } return $value; } if ( ! is_string( $value ) || ! str_starts_with( $value, 'var:preset|' ) ) { return $value; } $unwrapped_name = str_replace( '|', '--', substr( $value, strlen( 'var:' ) ) ); return "var(--wp--$unwrapped_name)";}Introduced in 7.1.0.
Signature, return type and hooks compared across 1 parsed release.
src/wp-includes/block-supports/states.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.