Automattic\WooCommerce\EmailEditor\Integrations\Core\Renderer\Blocks

Social_Links::get_service_png_pathpublicWC 1.0

Gets the service PNG path.

Метод класса: Social_Links{}

Хуков нет.

Возвращает

string. The service PNG path.

Использование

$Social_Links = new Social_Links();
$Social_Links->get_service_png_path( $service, $image_type );
$service(строка) (обязательный)
The service name.
$image_type(строка)
The image type. e.g 'white', 'brand'.
По умолчанию: 'white'

Код Social_Links::get_service_png_path() WC 11.1.0

public function get_service_png_path( $service, $image_type = 'white' ) {
	if ( empty( $service ) ) {
		return '';
	}

	$image_type = empty( $image_type ) ? 'white' : $image_type;
	$file_name  = "/icons/{$service}/{$service}-{$image_type}.png";
	return __DIR__ . $file_name;
}