$url = 'mailto:' .
$url;
} /**
* Prepend URL with https:// if it doesn't appear to contain a scheme
* and it's not a relative link starting with //.
*/
if ( !
parse_url( $url, PHP_URL_SCHEME
) && !
str_starts_with( $url, '//'
) ) { $url = 'https://' .
$url;
} $icon =
block_core_social_link_get_icon( $service );
$wrapper_attributes =
get_block_wrapper_attributes( array
( 'class' => 'wp-social-link wp-social-link-' .
$service .
block_core_social_link_get_color_classes( $block->context
),
'style' =>
block_core_social_link_get_color_styles( $block->context
),
) );
$link = '<li ' .
$wrapper_attributes . '>';
$link .= '<a href="' .
esc_url( $url ) . '" class="wp-block-social-link-anchor">';
$link .=
$icon;
$link .= '<span class="wp-block-social-link-label' .
( $show_labels ? '' : ' screen-reader-text'
) . '">';