block_core_social_link_get_icon

Advertisement

Summery Summery

Returns the SVG for social link.

Syntax Syntax

block_core_social_link_get_icon( string $service )

Parameters Parameters

$service

(Required) The service icon.

Return Return

(string) SVG Element for service icon.

Source Source

File: wp-includes/blocks/social-link.php

function block_core_social_link_get_icon( $service ) {
	$services = block_core_social_link_services();
	if ( isset( $services[ $service ] ) && isset( $services[ $service ]['icon'] ) ) {
		return $services[ $service ]['icon'];
	}

	return $services['share']['icon'];
}

Advertisement

Advertisement

Leave a Reply