W3cubDocs

/WordPress

WP_Font_Face::__construct()

Creates and initializes an instance of WP_Font_Face.

Source

public function __construct() {
	if (
		function_exists( 'is_admin' ) && ! is_admin()
		&&
		function_exists( 'current_theme_supports' ) && ! current_theme_supports( 'html5', 'style' )
	) {
		$this->style_tag_attrs = array( 'type' => 'text/css' );
	}
}

Changelog

Version Description
6.4.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_font_face/__construct