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

Social_Links::get_service_png_urlpublicWC 1.0

Gets the service PNG URL.

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

Хуков нет.

Возвращает

Строку. The service PNG URL.

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

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

Код Social_Links::get_service_png_url() WC 10.3.5

public function get_service_png_url( $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 plugins_url( $file_name, __FILE__ );
}