Skip to content

Commit

Permalink
pluck out the google-fonts provider.
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Dec 2, 2021
1 parent cb32b30 commit 56dcf19
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 770 deletions.
4 changes: 2 additions & 2 deletions lib/webfonts-api/class-wp-webfonts-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* ⤢ ⤡
* Webfonts Registry Providers Registry
* ↕ ⤢ ⤡ .. [custom providers]
* Validator Local Google Fonts
* Validator Local Other Fonts
* Provider Provider
* ↕ ↕
* Filesystem Remote Font API Service
Expand Down Expand Up @@ -213,7 +213,7 @@ private function generate_styles() {
*
* @param bool $has_permission Permission to do the remote request.
* Default false.
* @param string $provider_id Provider's ID, e.g. 'google', to identify
* @param string $provider_id Provider's ID, e.g. 'local', to identify
* the remote webfonts service provider.
*/
true !== apply_filters( 'has_remote_webfonts_request_permission', false, $provider_id )
Expand Down
4 changes: 0 additions & 4 deletions lib/webfonts-api/class-wp-webfonts-provider-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ private function register_core_providers() {
// Load the abstract class into memory.
require_once __DIR__ . '/providers/class-wp-webfonts-provider.php';

// Register the Google Provider.
require_once __DIR__ . '/providers/class-wp-webfonts-google-provider.php';
$this->register( WP_Webfonts_Google_Provider::class );

// Register the Local Provider.
require_once __DIR__ . '/providers/class-wp-webfonts-local-provider.php';
$this->register( WP_Webfonts_Local_Provider::class );
Expand Down
2 changes: 1 addition & 1 deletion lib/webfonts-api/class-wp-webfonts-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function get_by_provider( $provider_id ) {
* @param array $webfont {
* Webfont definition.
*
* @type string $provider The provider ID (e.g. 'local', 'google').
* @type string $provider The provider ID (e.g. 'local').
* @type string $font_family The @font-face font-family property.
* @type string $font_weight The @font-face font-weight property.
* The font-weight can be a single value, or a range.
Expand Down
2 changes: 1 addition & 1 deletion lib/webfonts-api/class-wp-webfonts-schema-validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class WP_Webfonts_Schema_Validator {
* @var array
*/
protected $basic_schema = array(
'provider' => '',
'provider' => 'local',
'font-family' => '',
'font-style' => 'normal',
'font-weight' => '400',
Expand Down
328 changes: 0 additions & 328 deletions lib/webfonts-api/providers/class-wp-webfonts-google-provider.php

This file was deleted.

Loading

0 comments on commit 56dcf19

Please sign in to comment.