$block_type = WP_Block_Type_Registry::
get_instance()->
get_registered( $block['blockName'
] );
$skip_link_color_serialization =
wp_should_skip_block_supports_serialization( $block_type, 'color', 'link'
);
if ( $skip_link_color_serialization ) { return $block_content;
} $link_color = null;
if ( !
empty( $block['attrs'
] ) ) { $link_color =
_wp_array_get( $block['attrs'
], array
( 'style', 'elements', 'link', 'color', 'text'
), null
);
} $hover_link_color = null;
if ( !
empty( $block['attrs'
] ) ) { $hover_link_color =
_wp_array_get( $block['attrs'
], array
( 'style', 'elements', 'link', ':hover', 'color', 'text'
), null
);
} /*
* For now we only care about link colors.
* This code in the future when we have a public API
* should take advantage of WP_Theme_JSON::compute_style_properties
* and work for any element and style.
*/