substr( $link_color, $index_to_splice ); $link_color = "var(--wp--preset--color--$link_color_name)"; } $link_color_declaration = esc_html( safecss_filter_attr( "color: $link_color" ) ); $style = ".$class_name a{" . $link_color_declaration . ';}'; wp_enqueue_block_support_styles( $style ); return null; } add_filter( 'render_block', 'wp_render_elements_support', 10, 2 ); add_filter( 'pre_render_block', 'wp_render_elements_support_styles', 10, 2 );