From 0ac9b362c157af8e11d9b900826e773e259aec80 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Fri, 2 Feb 2024 11:16:05 +0000 Subject: [PATCH 1/4] Move font/ to compat dir for 6.5 --- .../class-gutenberg-fonts-api-bc-layer.php | 0 .../class-wp-fonts-provider-local.php | 0 .../bc-layer/class-wp-fonts-provider.php | 0 .../bc-layer/class-wp-fonts-resolver.php | 0 .../bc-layer/class-wp-fonts-utils.php | 0 .../font-face/bc-layer/class-wp-fonts.php | 0 .../font-face/bc-layer/class-wp-web-fonts.php | 0 .../class-wp-webfonts-provider-local.php | 0 .../bc-layer/class-wp-webfonts-provider.php | 0 .../bc-layer/class-wp-webfonts-utils.php | 0 .../font-face/bc-layer/class-wp-webfonts.php | 0 .../bc-layer/webfonts-deprecations.php | 0 .../font-library/class-wp-font-collection.php | 0 .../font-library/class-wp-font-library.php | 0 .../font-library/class-wp-font-utils.php | 0 ...ss-wp-rest-font-collections-controller.php | 0 .../class-wp-rest-font-faces-controller.php | 0 ...class-wp-rest-font-families-controller.php | 0 .../fonts/font-library/font-library.php | 0 lib/load.php | 38 +++++++++---------- 20 files changed, 19 insertions(+), 19 deletions(-) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-face/bc-layer/class-gutenberg-fonts-api-bc-layer.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-face/bc-layer/class-wp-fonts-provider-local.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-face/bc-layer/class-wp-fonts-provider.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-face/bc-layer/class-wp-fonts-resolver.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-face/bc-layer/class-wp-fonts-utils.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-face/bc-layer/class-wp-fonts.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-face/bc-layer/class-wp-web-fonts.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-face/bc-layer/class-wp-webfonts-provider-local.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-face/bc-layer/class-wp-webfonts-provider.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-face/bc-layer/class-wp-webfonts-utils.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-face/bc-layer/class-wp-webfonts.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-face/bc-layer/webfonts-deprecations.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-library/class-wp-font-collection.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-library/class-wp-font-library.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-library/class-wp-font-utils.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-library/class-wp-rest-font-collections-controller.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-library/class-wp-rest-font-faces-controller.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-library/class-wp-rest-font-families-controller.php (100%) rename lib/{experimental => compat/wordpress-6.5}/fonts/font-library/font-library.php (100%) diff --git a/lib/experimental/fonts/font-face/bc-layer/class-gutenberg-fonts-api-bc-layer.php b/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-gutenberg-fonts-api-bc-layer.php similarity index 100% rename from lib/experimental/fonts/font-face/bc-layer/class-gutenberg-fonts-api-bc-layer.php rename to lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-gutenberg-fonts-api-bc-layer.php diff --git a/lib/experimental/fonts/font-face/bc-layer/class-wp-fonts-provider-local.php b/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-provider-local.php similarity index 100% rename from lib/experimental/fonts/font-face/bc-layer/class-wp-fonts-provider-local.php rename to lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-provider-local.php diff --git a/lib/experimental/fonts/font-face/bc-layer/class-wp-fonts-provider.php b/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-provider.php similarity index 100% rename from lib/experimental/fonts/font-face/bc-layer/class-wp-fonts-provider.php rename to lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-provider.php diff --git a/lib/experimental/fonts/font-face/bc-layer/class-wp-fonts-resolver.php b/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-resolver.php similarity index 100% rename from lib/experimental/fonts/font-face/bc-layer/class-wp-fonts-resolver.php rename to lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-resolver.php diff --git a/lib/experimental/fonts/font-face/bc-layer/class-wp-fonts-utils.php b/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-utils.php similarity index 100% rename from lib/experimental/fonts/font-face/bc-layer/class-wp-fonts-utils.php rename to lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-utils.php diff --git a/lib/experimental/fonts/font-face/bc-layer/class-wp-fonts.php b/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts.php similarity index 100% rename from lib/experimental/fonts/font-face/bc-layer/class-wp-fonts.php rename to lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts.php diff --git a/lib/experimental/fonts/font-face/bc-layer/class-wp-web-fonts.php b/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-web-fonts.php similarity index 100% rename from lib/experimental/fonts/font-face/bc-layer/class-wp-web-fonts.php rename to lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-web-fonts.php diff --git a/lib/experimental/fonts/font-face/bc-layer/class-wp-webfonts-provider-local.php b/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-provider-local.php similarity index 100% rename from lib/experimental/fonts/font-face/bc-layer/class-wp-webfonts-provider-local.php rename to lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-provider-local.php diff --git a/lib/experimental/fonts/font-face/bc-layer/class-wp-webfonts-provider.php b/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-provider.php similarity index 100% rename from lib/experimental/fonts/font-face/bc-layer/class-wp-webfonts-provider.php rename to lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-provider.php diff --git a/lib/experimental/fonts/font-face/bc-layer/class-wp-webfonts-utils.php b/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-utils.php similarity index 100% rename from lib/experimental/fonts/font-face/bc-layer/class-wp-webfonts-utils.php rename to lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-utils.php diff --git a/lib/experimental/fonts/font-face/bc-layer/class-wp-webfonts.php b/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts.php similarity index 100% rename from lib/experimental/fonts/font-face/bc-layer/class-wp-webfonts.php rename to lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts.php diff --git a/lib/experimental/fonts/font-face/bc-layer/webfonts-deprecations.php b/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/webfonts-deprecations.php similarity index 100% rename from lib/experimental/fonts/font-face/bc-layer/webfonts-deprecations.php rename to lib/compat/wordpress-6.5/fonts/font-face/bc-layer/webfonts-deprecations.php diff --git a/lib/experimental/fonts/font-library/class-wp-font-collection.php b/lib/compat/wordpress-6.5/fonts/font-library/class-wp-font-collection.php similarity index 100% rename from lib/experimental/fonts/font-library/class-wp-font-collection.php rename to lib/compat/wordpress-6.5/fonts/font-library/class-wp-font-collection.php diff --git a/lib/experimental/fonts/font-library/class-wp-font-library.php b/lib/compat/wordpress-6.5/fonts/font-library/class-wp-font-library.php similarity index 100% rename from lib/experimental/fonts/font-library/class-wp-font-library.php rename to lib/compat/wordpress-6.5/fonts/font-library/class-wp-font-library.php diff --git a/lib/experimental/fonts/font-library/class-wp-font-utils.php b/lib/compat/wordpress-6.5/fonts/font-library/class-wp-font-utils.php similarity index 100% rename from lib/experimental/fonts/font-library/class-wp-font-utils.php rename to lib/compat/wordpress-6.5/fonts/font-library/class-wp-font-utils.php diff --git a/lib/experimental/fonts/font-library/class-wp-rest-font-collections-controller.php b/lib/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-collections-controller.php similarity index 100% rename from lib/experimental/fonts/font-library/class-wp-rest-font-collections-controller.php rename to lib/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-collections-controller.php diff --git a/lib/experimental/fonts/font-library/class-wp-rest-font-faces-controller.php b/lib/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-faces-controller.php similarity index 100% rename from lib/experimental/fonts/font-library/class-wp-rest-font-faces-controller.php rename to lib/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-faces-controller.php diff --git a/lib/experimental/fonts/font-library/class-wp-rest-font-families-controller.php b/lib/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-families-controller.php similarity index 100% rename from lib/experimental/fonts/font-library/class-wp-rest-font-families-controller.php rename to lib/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-families-controller.php diff --git a/lib/experimental/fonts/font-library/font-library.php b/lib/compat/wordpress-6.5/fonts/font-library/font-library.php similarity index 100% rename from lib/experimental/fonts/font-library/font-library.php rename to lib/compat/wordpress-6.5/fonts/font-library/font-library.php diff --git a/lib/load.php b/lib/load.php index f5c606727f9f47..5be5939e0930a4 100644 --- a/lib/load.php +++ b/lib/load.php @@ -137,13 +137,13 @@ function gutenberg_is_experiment_enabled( $name ) { remove_action( 'plugins_loaded', '_wp_theme_json_webfonts_handler' ); // Turns off WordPress 6.0's stopgap handler. // Loads the Font Library. -require __DIR__ . '/experimental/fonts/font-library/class-wp-font-collection.php'; -require __DIR__ . '/experimental/fonts/font-library/class-wp-font-library.php'; -require __DIR__ . '/experimental/fonts/font-library/class-wp-font-utils.php'; -require __DIR__ . '/experimental/fonts/font-library/class-wp-rest-font-families-controller.php'; -require __DIR__ . '/experimental/fonts/font-library/class-wp-rest-font-faces-controller.php'; -require __DIR__ . '/experimental/fonts/font-library/class-wp-rest-font-collections-controller.php'; -require __DIR__ . '/experimental/fonts/font-library/font-library.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-library/class-wp-font-collection.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-library/class-wp-font-library.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-library/class-wp-font-utils.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-families-controller.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-faces-controller.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-collections-controller.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-library/font-library.php'; // Load the Font Face and Font Face Resolver, if not already loaded by WordPress Core. if ( ! class_exists( 'WP_Font_Face' ) ) { @@ -160,18 +160,18 @@ function gutenberg_is_experiment_enabled( $name ) { // Load the BC Layer to avoid fatal errors of extenders using the Fonts API. // @core-merge: do not merge the BC layer files into WordPress Core. -require __DIR__ . '/experimental/fonts/font-face/bc-layer/class-wp-fonts-provider.php'; -require __DIR__ . '/experimental/fonts/font-face/bc-layer/class-wp-fonts-utils.php'; -require __DIR__ . '/experimental/fonts/font-face/bc-layer/class-wp-fonts.php'; -require __DIR__ . '/experimental/fonts/font-face/bc-layer/class-wp-fonts-provider-local.php'; -require __DIR__ . '/experimental/fonts/font-face/bc-layer/class-wp-fonts-resolver.php'; -require __DIR__ . '/experimental/fonts/font-face/bc-layer/class-gutenberg-fonts-api-bc-layer.php'; -require __DIR__ . '/experimental/fonts/font-face/bc-layer/webfonts-deprecations.php'; -require __DIR__ . '/experimental/fonts/font-face/bc-layer/class-wp-webfonts-utils.php'; -require __DIR__ . '/experimental/fonts/font-face/bc-layer/class-wp-webfonts-provider.php'; -require __DIR__ . '/experimental/fonts/font-face/bc-layer/class-wp-webfonts-provider-local.php'; -require __DIR__ . '/experimental/fonts/font-face/bc-layer/class-wp-webfonts.php'; -require __DIR__ . '/experimental/fonts/font-face/bc-layer/class-wp-web-fonts.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-provider.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-utils.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-provider-local.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-resolver.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-gutenberg-fonts-api-bc-layer.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/webfonts-deprecations.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-utils.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-provider.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-provider-local.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-web-fonts.php'; // Plugin specific code. require __DIR__ . '/script-loader.php'; From 9fcbc244497f810511f9f5f1f4997929ba330ad5 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 2 Feb 2024 14:32:36 +0100 Subject: [PATCH 2/4] Move back bc-layer to experimental folder --- .../class-gutenberg-fonts-api-bc-layer.php | 0 .../class-wp-fonts-provider-local.php | 0 .../bc-layer/class-wp-fonts-provider.php | 0 .../bc-layer/class-wp-fonts-resolver.php | 0 .../bc-layer/class-wp-fonts-utils.php | 0 .../font-face/bc-layer/class-wp-fonts.php | 0 .../font-face/bc-layer/class-wp-web-fonts.php | 0 .../class-wp-webfonts-provider-local.php | 0 .../bc-layer/class-wp-webfonts-provider.php | 0 .../bc-layer/class-wp-webfonts-utils.php | 0 .../font-face/bc-layer/class-wp-webfonts.php | 0 .../bc-layer/webfonts-deprecations.php | 0 lib/load.php | 24 +++++++++---------- 13 files changed, 12 insertions(+), 12 deletions(-) rename lib/{compat/wordpress-6.5/fonts => experimental}/font-face/bc-layer/class-gutenberg-fonts-api-bc-layer.php (100%) rename lib/{compat/wordpress-6.5/fonts => experimental}/font-face/bc-layer/class-wp-fonts-provider-local.php (100%) rename lib/{compat/wordpress-6.5/fonts => experimental}/font-face/bc-layer/class-wp-fonts-provider.php (100%) rename lib/{compat/wordpress-6.5/fonts => experimental}/font-face/bc-layer/class-wp-fonts-resolver.php (100%) rename lib/{compat/wordpress-6.5/fonts => experimental}/font-face/bc-layer/class-wp-fonts-utils.php (100%) rename lib/{compat/wordpress-6.5/fonts => experimental}/font-face/bc-layer/class-wp-fonts.php (100%) rename lib/{compat/wordpress-6.5/fonts => experimental}/font-face/bc-layer/class-wp-web-fonts.php (100%) rename lib/{compat/wordpress-6.5/fonts => experimental}/font-face/bc-layer/class-wp-webfonts-provider-local.php (100%) rename lib/{compat/wordpress-6.5/fonts => experimental}/font-face/bc-layer/class-wp-webfonts-provider.php (100%) rename lib/{compat/wordpress-6.5/fonts => experimental}/font-face/bc-layer/class-wp-webfonts-utils.php (100%) rename lib/{compat/wordpress-6.5/fonts => experimental}/font-face/bc-layer/class-wp-webfonts.php (100%) rename lib/{compat/wordpress-6.5/fonts => experimental}/font-face/bc-layer/webfonts-deprecations.php (100%) diff --git a/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-gutenberg-fonts-api-bc-layer.php b/lib/experimental/font-face/bc-layer/class-gutenberg-fonts-api-bc-layer.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-gutenberg-fonts-api-bc-layer.php rename to lib/experimental/font-face/bc-layer/class-gutenberg-fonts-api-bc-layer.php diff --git a/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-provider-local.php b/lib/experimental/font-face/bc-layer/class-wp-fonts-provider-local.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-provider-local.php rename to lib/experimental/font-face/bc-layer/class-wp-fonts-provider-local.php diff --git a/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-provider.php b/lib/experimental/font-face/bc-layer/class-wp-fonts-provider.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-provider.php rename to lib/experimental/font-face/bc-layer/class-wp-fonts-provider.php diff --git a/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-resolver.php b/lib/experimental/font-face/bc-layer/class-wp-fonts-resolver.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-resolver.php rename to lib/experimental/font-face/bc-layer/class-wp-fonts-resolver.php diff --git a/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-utils.php b/lib/experimental/font-face/bc-layer/class-wp-fonts-utils.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-utils.php rename to lib/experimental/font-face/bc-layer/class-wp-fonts-utils.php diff --git a/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts.php b/lib/experimental/font-face/bc-layer/class-wp-fonts.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts.php rename to lib/experimental/font-face/bc-layer/class-wp-fonts.php diff --git a/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-web-fonts.php b/lib/experimental/font-face/bc-layer/class-wp-web-fonts.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-web-fonts.php rename to lib/experimental/font-face/bc-layer/class-wp-web-fonts.php diff --git a/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-provider-local.php b/lib/experimental/font-face/bc-layer/class-wp-webfonts-provider-local.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-provider-local.php rename to lib/experimental/font-face/bc-layer/class-wp-webfonts-provider-local.php diff --git a/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-provider.php b/lib/experimental/font-face/bc-layer/class-wp-webfonts-provider.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-provider.php rename to lib/experimental/font-face/bc-layer/class-wp-webfonts-provider.php diff --git a/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-utils.php b/lib/experimental/font-face/bc-layer/class-wp-webfonts-utils.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-utils.php rename to lib/experimental/font-face/bc-layer/class-wp-webfonts-utils.php diff --git a/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts.php b/lib/experimental/font-face/bc-layer/class-wp-webfonts.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts.php rename to lib/experimental/font-face/bc-layer/class-wp-webfonts.php diff --git a/lib/compat/wordpress-6.5/fonts/font-face/bc-layer/webfonts-deprecations.php b/lib/experimental/font-face/bc-layer/webfonts-deprecations.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-face/bc-layer/webfonts-deprecations.php rename to lib/experimental/font-face/bc-layer/webfonts-deprecations.php diff --git a/lib/load.php b/lib/load.php index 5be5939e0930a4..3e38414d3137f2 100644 --- a/lib/load.php +++ b/lib/load.php @@ -160,18 +160,18 @@ function gutenberg_is_experiment_enabled( $name ) { // Load the BC Layer to avoid fatal errors of extenders using the Fonts API. // @core-merge: do not merge the BC layer files into WordPress Core. -require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-provider.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-utils.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-provider-local.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-fonts-resolver.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-gutenberg-fonts-api-bc-layer.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/webfonts-deprecations.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-utils.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-provider.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts-provider-local.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-webfonts.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-face/bc-layer/class-wp-web-fonts.php'; +require __DIR__ . '/experimental/fon/font-face/bc-layer/class-wp-fonts-provider.php'; +require __DIR__ . '/experimental/font-face/bc-layer/class-wp-fonts-utils.php'; +require __DIR__ . '/experimental/font-face/bc-layer/class-wp-fonts.php'; +require __DIR__ . '/experimental/font-face/bc-layer/class-wp-fonts-provider-local.php'; +require __DIR__ . '/experimental/font-face/bc-layer/class-wp-fonts-resolver.php'; +require __DIR__ . '/experimental/font-face/bc-layer/class-gutenberg-fonts-api-bc-layer.php'; +require __DIR__ . '/experimental/font-face/bc-layer/webfonts-deprecations.php'; +require __DIR__ . '/experimental/font-face/bc-layer/class-wp-webfonts-utils.php'; +require __DIR__ . '/experimental/font-face/bc-layer/class-wp-webfonts-provider.php'; +require __DIR__ . '/experimental/font-face/bc-layer/class-wp-webfonts-provider-local.php'; +require __DIR__ . '/experimental/font-face/bc-layer/class-wp-webfonts.php'; +require __DIR__ . '/experimental/font-face/bc-layer/class-wp-web-fonts.php'; // Plugin specific code. require __DIR__ . '/script-loader.php'; From 7f40c374881ce31862e17bc82c84808e1761b527 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 2 Feb 2024 14:35:40 +0100 Subject: [PATCH 3/4] Simplify folder structure --- .../class-wp-font-collection.php | 0 .../{font-library => }/class-wp-font-library.php | 0 .../{font-library => }/class-wp-font-utils.php | 0 .../class-wp-rest-font-collections-controller.php | 0 .../class-wp-rest-font-faces-controller.php | 0 .../class-wp-rest-font-families-controller.php | 0 .../{font-library/font-library.php => fonts.php} | 0 lib/load.php | 14 +++++++------- 8 files changed, 7 insertions(+), 7 deletions(-) rename lib/compat/wordpress-6.5/fonts/{font-library => }/class-wp-font-collection.php (100%) rename lib/compat/wordpress-6.5/fonts/{font-library => }/class-wp-font-library.php (100%) rename lib/compat/wordpress-6.5/fonts/{font-library => }/class-wp-font-utils.php (100%) rename lib/compat/wordpress-6.5/fonts/{font-library => }/class-wp-rest-font-collections-controller.php (100%) rename lib/compat/wordpress-6.5/fonts/{font-library => }/class-wp-rest-font-faces-controller.php (100%) rename lib/compat/wordpress-6.5/fonts/{font-library => }/class-wp-rest-font-families-controller.php (100%) rename lib/compat/wordpress-6.5/fonts/{font-library/font-library.php => fonts.php} (100%) diff --git a/lib/compat/wordpress-6.5/fonts/font-library/class-wp-font-collection.php b/lib/compat/wordpress-6.5/fonts/class-wp-font-collection.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-library/class-wp-font-collection.php rename to lib/compat/wordpress-6.5/fonts/class-wp-font-collection.php diff --git a/lib/compat/wordpress-6.5/fonts/font-library/class-wp-font-library.php b/lib/compat/wordpress-6.5/fonts/class-wp-font-library.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-library/class-wp-font-library.php rename to lib/compat/wordpress-6.5/fonts/class-wp-font-library.php diff --git a/lib/compat/wordpress-6.5/fonts/font-library/class-wp-font-utils.php b/lib/compat/wordpress-6.5/fonts/class-wp-font-utils.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-library/class-wp-font-utils.php rename to lib/compat/wordpress-6.5/fonts/class-wp-font-utils.php diff --git a/lib/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-collections-controller.php b/lib/compat/wordpress-6.5/fonts/class-wp-rest-font-collections-controller.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-collections-controller.php rename to lib/compat/wordpress-6.5/fonts/class-wp-rest-font-collections-controller.php diff --git a/lib/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-faces-controller.php b/lib/compat/wordpress-6.5/fonts/class-wp-rest-font-faces-controller.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-faces-controller.php rename to lib/compat/wordpress-6.5/fonts/class-wp-rest-font-faces-controller.php diff --git a/lib/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-families-controller.php b/lib/compat/wordpress-6.5/fonts/class-wp-rest-font-families-controller.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-families-controller.php rename to lib/compat/wordpress-6.5/fonts/class-wp-rest-font-families-controller.php diff --git a/lib/compat/wordpress-6.5/fonts/font-library/font-library.php b/lib/compat/wordpress-6.5/fonts/fonts.php similarity index 100% rename from lib/compat/wordpress-6.5/fonts/font-library/font-library.php rename to lib/compat/wordpress-6.5/fonts/fonts.php diff --git a/lib/load.php b/lib/load.php index 3e38414d3137f2..0d6f2ecc79f67b 100644 --- a/lib/load.php +++ b/lib/load.php @@ -137,13 +137,13 @@ function gutenberg_is_experiment_enabled( $name ) { remove_action( 'plugins_loaded', '_wp_theme_json_webfonts_handler' ); // Turns off WordPress 6.0's stopgap handler. // Loads the Font Library. -require __DIR__ . '/compat/wordpress-6.5/fonts/font-library/class-wp-font-collection.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-library/class-wp-font-library.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-library/class-wp-font-utils.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-families-controller.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-faces-controller.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-library/class-wp-rest-font-collections-controller.php'; -require __DIR__ . '/compat/wordpress-6.5/fonts/font-library/font-library.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/class-wp-font-collection.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/class-wp-font-library.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/class-wp-font-utils.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/class-wp-rest-font-families-controller.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/class-wp-rest-font-faces-controller.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/class-wp-rest-font-collections-controller.php'; +require __DIR__ . '/compat/wordpress-6.5/fonts/fonts.php'; // Load the Font Face and Font Face Resolver, if not already loaded by WordPress Core. if ( ! class_exists( 'WP_Font_Face' ) ) { From d3a9f570ec885405d0753ad0b5d2e734bb6d0fc2 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 2 Feb 2024 14:36:35 +0100 Subject: [PATCH 4/4] Fix typo --- lib/load.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/load.php b/lib/load.php index 0d6f2ecc79f67b..4363db46d55d49 100644 --- a/lib/load.php +++ b/lib/load.php @@ -160,7 +160,7 @@ function gutenberg_is_experiment_enabled( $name ) { // Load the BC Layer to avoid fatal errors of extenders using the Fonts API. // @core-merge: do not merge the BC layer files into WordPress Core. -require __DIR__ . '/experimental/fon/font-face/bc-layer/class-wp-fonts-provider.php'; +require __DIR__ . '/experimental/font-face/bc-layer/class-wp-fonts-provider.php'; require __DIR__ . '/experimental/font-face/bc-layer/class-wp-fonts-utils.php'; require __DIR__ . '/experimental/font-face/bc-layer/class-wp-fonts.php'; require __DIR__ . '/experimental/font-face/bc-layer/class-wp-fonts-provider-local.php';