wp-includes/block-supports/states.php:457Splits a selector list by top-level commas.
$selectorstringstring[]function wp_split_selector_list( $selector ) { if ( ! str_contains( $selector, ',' ) ) { return array( $selector ); } $selectors = array(); $current_selector = ''; $parentheses_depth = 0; $selector_length = strlen( $selector ); for ( $i = 0; $i < $selector_length; $i++ ) { $char = $selector[ $i ]; if ( '(' === $char ) { ++$parentheses_depth; } elseif ( ')' === $char && $parentheses_depth > 0 ) { --$parentheses_depth; } elseif ( ',' === $char && 0 === $parentheses_depth ) { $selectors[] = $current_selector; $current_selector = ''; continue; } $current_selector .= $char; } $selectors[] = $current_selector; return $selectors;}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.