public static function request_google_fonts( $api_key = null ) {
		$api_key = apply_filters( 'suru_libs_google_fonts_api_keys', $api_key );

		if ( empty( $api_key ) ) {
			return false;
		}

		$response = wp_remote_get( static::GOOGLE_FONTS_ENDPOINT . '?sort=alpha' . ( $api_key ? "&key={$api_key}" : '' ),
			[ 'sslverify' => false ]
		);

		if ( 200 !== wp_remote_retrieve_response_code( $response ) ) {
			return false;
		}

		return json_decode( wp_remote_retrieve_body( $response ), true );
	}
public static function request_google_fonts( $api_key = null ) {
		$api_key = apply_filters( 'suru_libs_google_fonts_api_keys', $api_key );

		if ( empty( $api_key ) ) {
			return false;
		}

		$response = wp_remote_get( static::GOOGLE_FONTS_ENDPOINT . '?sort=alpha' . ( $api_key ? "&key={$api_key}" : '' ),
			[ 'sslverify' => false ]
		);

		if ( 200 !== wp_remote_retrieve_response_code( $response ) ) {
			return false;
		}

		return json_decode( wp_remote_retrieve_body( $response ), true );
	}
public static function request_google_fonts ( $ api_key = null ) { $ api_key = apply_filters ( 'suru_libs_google_fonts_api_keys' , $ api_key ) ; if ( empty ( $ api_key ) ) { return false ; } $ response = wp_remote_get ( static :: GOOGLE_FONTS_ENDPOINT . '?sort=alpha' . ( $ api_key ? "&key={$api_key}" : '' ) , [ 'sslverify' => false ] ) ; if ( 200 !== wp_remote_retrieve_response_code ( $ response ) ) { return false ; } return json_decode ( wp_remote_retrieve_body ( $ response ) , true ) ; }
Send http request to get fonts from Google Fonts service.

@see https://developers.google.com/fonts/docs/developer_api

@param  string $api_key The Google Fonts API key.
@return array|false
Send http request to get fonts from Google Fonts service .