WordPress at Your Fingertips
function is not described

render_block_core_social_link() WP 1.0

Renders the core/social-link block on server.

No Hooks.

Return

String. Rendered HTML of the referenced block.

Usage

render_block_core_social_link( $attributes, $content, $block );
$attributes(Array) (required)
The block attributes.
$content(String) (required)
InnerBlocks content of the Block.
$block(WP_Block) (required)
Block object.

Code of render_block_core_social_link() WP 5.8

<?php
function render_block_core_social_link( $attributes, $content, $block ) {
	$open_in_new_tab = isset( $block->context['openInNewTab'] ) ? $block->context['openInNewTab'] : false;

	$service = ( isset( $attributes['service'] ) ) ? $attributes['service'] : 'Icon';
	$url     = ( isset( $attributes['url'] ) ) ? $attributes['url'] : false;
	$label   = ( isset( $attributes['label'] ) ) ? $attributes['label'] : sprintf(
		/* translators: %1$s: Social-network name. %2$s: URL. */
		__( '%1$s: %2$s' ),
		block_core_social_link_get_name( $service ),
		$url
	);
	$class_name = isset( $attributes['className'] ) ? ' ' . $attributes['className'] : false;

	// Don't render a link if there is no URL set.
	if ( ! $url ) {
		return '';
	}

	$attribute = '';
	if ( $open_in_new_tab ) {
		$attribute = 'rel="noopener nofollow" target="_blank"';
	}

	$icon               = block_core_social_link_get_icon( $service );
	$wrapper_attributes = get_block_wrapper_attributes(
		array(
			'class' => 'wp-social-link wp-social-link-' . $service . $class_name,
			'style' => block_core_social_link_get_color_styles( $block->context ),
		)
	);

	return '<li ' . $wrapper_attributes . '><a href="' . esc_url( $url ) . '" aria-label="' . esc_attr( $label ) . '" ' . $attribute . ' class="wp-block-social-link-anchor"> ' . $icon . '</a></li>';
}