This function has been deprecated. Use astra_get_webfont_url() instead.

ast_get_webfont_url( string $google_font_url )

Deprecating ast_get_webfont_url function.


Description

Getting webfont based Google font URL.

See also


Parameters

$google_font_url

(string) (Required) Google Font URL generated by customizer config.


Return

(string)


Source

File: inc/core/deprecated/deprecated-functions.php

function ast_get_webfont_url( $url, $format = 'woff2' ) {

	// Check if already Google font URL present or not. Basically avoiding 'Astra_WebFont_Loader' class rendering.
	/** @psalm-suppress InvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort
	$astra_font_url = astra_get_option( 'astra_font_url', false );
	if ( $astra_font_url ) {
		return json_decode( $astra_font_url );
	}

	// Now create font URL if its not present.
	$font = astra_webfont_loader_instance( $url );
	$font->set_font_format( $format );
	return $font->get_url();
}

Changelog

Changelog
Version Description
3.7.4 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.