wp-includes/class-wp-duotone.php:552Takes the inline CSS duotone variable from a block and return the slug.
$duotone_attrstring|string[]string private static function get_slug_from_attribute( $duotone_attr ) { if ( ! is_string( $duotone_attr ) ) { return ''; } // Uses Branch Reset Groups `(?|…)` to return one capture group. preg_match( '/(?|var:preset\|duotone\|(\S+)|var\(--wp--preset--duotone--(\S+)\))/', $duotone_attr, $matches ); return ! empty( $matches[1] ) ? $matches[1] : ''; }Introduced in 6.3.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
$duotone_attr retyped from string to string|string[].verified against sourcesrc/wp-includes/class-wp-duotone.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.