Automattic\WooCommerce\Internal\ComingSoon

ComingSoonRequestHandler::declares_font_files │ private │ WC 1.0

Checks whether any font face declares font files.

This does not check that WordPress accepts the faces. WordPress reports invalid faces itself.

Method of the class: ComingSoonRequestHandler{}

No Hooks.

Returns

bool. Whether at least one face has a non-empty src.

Usage

// private - for code of main (parent) class only
$result = $this->declares_font_files( $font_faces ): bool;
$font_faces(array[]) (required)
Font face definitions.

ComingSoonRequestHandler::declares_font_files() code WC 11.3.0

private function declares_font_files( array $font_faces ): bool {
	foreach ( $font_faces as $font_face ) {
		if ( ! empty( $font_face['src'] ) ) {
			return true;
		}
	}

	return false;
}