private static function get_all_global_style_block_names() { if ( isset( self::
$global_styles_block_names ) ) { return self::
$global_styles_block_names;
} // Get the per block settings from the theme.json.
$tree = WP_Theme_JSON_Resolver::
get_merged_data();
$block_nodes =
$tree->
get_styles_block_nodes();
$theme_json =
$tree->
get_raw_data();
self::
$global_styles_block_names = array
();
foreach ( $block_nodes as $block_node ) { // This block definition doesn't include any duotone settings. Skip it.
if ( empty( $block_node['duotone'
] ) ) { continue;
} // Value looks like this: 'var(--wp--preset--duotone--blue-orange)' or 'var:preset|duotone|blue-orange'.