Docs

wptt_get_webfont_styles( string $url, string $format = 'woff2' ): string

Get styles for a webfont.

Description

This will get the CSS from the remote API, download any fonts it contains, replace references to remote URLs with locally-downloaded assets, and finally return the resulting CSS.

Parameters

$urlstringrequired
The URL of the remote webfont.
$formatstringoptional
The font-format. If you need to support IE, change this to "woff".

Default:'woff2'

Return

string Returns the CSS.

Changelog

VersionDescription
1.0.0Introduced.