From 5b27d84c975f59850090d2479a22d8c5e7b763d5 Mon Sep 17 00:00:00 2001 From: Mike Wilkerson Date: Mon, 24 Jun 2019 13:44:51 -0700 Subject: [PATCH] Release 4.0.0-rc11 --- admin/package.json | 2 +- docs/classes/FortAwesome.FontAwesome.html | 10 +- ...Awesome.FontAwesome_Config_Controller.html | 10 +- ...tAwesome.FontAwesome_Release_Provider.html | 10 +- docs/files/font-awesome.html | 10 +- docs/files/font-awesome.php.txt | 2 +- ...s.class-fontawesome-config-controller.html | 10 +- ...es.class-fontawesome-release-provider.html | 10 +- docs/files/includes.class-fontawesome.html | 10 +- ...lass-fontawesome-config-controller.php.txt | 6 +- docs/files/includes/class-fontawesome.php.txt | 111 ++++++++++-------- docs/graphs/class.html | 2 +- docs/index.html | 10 +- docs/namespaces/FortAwesome.html | 10 +- docs/namespaces/default.html | 10 +- docs/reports/deprecated.html | 2 +- docs/reports/errors.html | 2 +- docs/reports/markers.html | 6 +- font-awesome.php | 2 +- includes/class-fontawesome.php | 2 +- readme.txt | 8 +- 21 files changed, 131 insertions(+), 114 deletions(-) diff --git a/admin/package.json b/admin/package.json index dbd62c959..f8265b318 100644 --- a/admin/package.json +++ b/admin/package.json @@ -1,6 +1,6 @@ { "name": "font-awesome-admin", - "version": "4.0.0-rc10", + "version": "4.0.0-rc11", "private": true, "dependencies": { "@babel/core": "7.1.0", diff --git a/docs/classes/FortAwesome.FontAwesome.html b/docs/classes/FortAwesome.FontAwesome.html index d78c603cb..7c1fae939 100644 --- a/docs/classes/FortAwesome.FontAwesome.html +++ b/docs/classes/FortAwesome.FontAwesome.html @@ -144,19 +144,19 @@
- + \
-
+
-
+
@@ -1770,7 +1770,7 @@


Documentation is powered by phpDocumentor and authored - on June 7th, 2019 at 20:25. + on June 24th, 2019 at 20:28.
diff --git a/docs/classes/FortAwesome.FontAwesome_Config_Controller.html b/docs/classes/FortAwesome.FontAwesome_Config_Controller.html index 55bda8809..8376a0a28 100644 --- a/docs/classes/FortAwesome.FontAwesome_Config_Controller.html +++ b/docs/classes/FortAwesome.FontAwesome_Config_Controller.html @@ -144,19 +144,19 @@
- + \
-
+
-
+
@@ -400,7 +400,7 @@


Documentation is powered by phpDocumentor and authored - on June 7th, 2019 at 20:25. + on June 24th, 2019 at 20:28.
diff --git a/docs/classes/FortAwesome.FontAwesome_Release_Provider.html b/docs/classes/FortAwesome.FontAwesome_Release_Provider.html index 0fe88aa68..ccec24e0a 100644 --- a/docs/classes/FortAwesome.FontAwesome_Release_Provider.html +++ b/docs/classes/FortAwesome.FontAwesome_Release_Provider.html @@ -144,19 +144,19 @@
- + \
-
+
-
+
@@ -658,7 +658,7 @@


Documentation is powered by phpDocumentor and authored - on June 7th, 2019 at 20:25. + on June 24th, 2019 at 20:28.
diff --git a/docs/files/font-awesome.html b/docs/files/font-awesome.html index ea89003aa..1efd1f36a 100644 --- a/docs/files/font-awesome.html +++ b/docs/files/font-awesome.html @@ -144,19 +144,19 @@
- + \
-
+
-
+
@@ -300,7 +300,7 @@


Documentation is powered by phpDocumentor and authored - on June 7th, 2019 at 20:25. + on June 24th, 2019 at 20:28.
diff --git a/docs/files/font-awesome.php.txt b/docs/files/font-awesome.php.txt index 8c155b50d..c41e490fb 100644 --- a/docs/files/font-awesome.php.txt +++ b/docs/files/font-awesome.php.txt @@ -7,7 +7,7 @@ use \Exception, \Error; * Plugin Name: Font Awesome * Plugin URI: https://fontawesome.com/how-to-use/on-the-web/using-with/wordpress * Description: Adds Font Awesome 5 icons to your WordPress site. Supports Font Awesome Pro. Resolves conflicts across many plugins or themes that use Font Awesome. - * Version: 4.0.0-rc10 + * Version: 4.0.0-rc11 * Author: Font Awesome * Author URI: https://fontawesome.com/ * License: GPLv2 (or later) diff --git a/docs/files/includes.class-fontawesome-config-controller.html b/docs/files/includes.class-fontawesome-config-controller.html index 9ea54dddf..ffd0c6d09 100644 --- a/docs/files/includes.class-fontawesome-config-controller.html +++ b/docs/files/includes.class-fontawesome-config-controller.html @@ -144,19 +144,19 @@
- + \
-
+
-
+
@@ -270,7 +270,7 @@


Documentation is powered by phpDocumentor and authored - on June 7th, 2019 at 20:25. + on June 24th, 2019 at 20:28.
diff --git a/docs/files/includes.class-fontawesome-release-provider.html b/docs/files/includes.class-fontawesome-release-provider.html index 4bc32274b..aac547adc 100644 --- a/docs/files/includes.class-fontawesome-release-provider.html +++ b/docs/files/includes.class-fontawesome-release-provider.html @@ -144,19 +144,19 @@
- + \
-
+
-
+
@@ -316,7 +316,7 @@


Documentation is powered by phpDocumentor and authored - on June 7th, 2019 at 20:25. + on June 24th, 2019 at 20:28.
diff --git a/docs/files/includes.class-fontawesome.html b/docs/files/includes.class-fontawesome.html index afe553b90..4fba4ec69 100644 --- a/docs/files/includes.class-fontawesome.html +++ b/docs/files/includes.class-fontawesome.html @@ -144,19 +144,19 @@
- + \
-
+
-
+
@@ -330,7 +330,7 @@


Documentation is powered by phpDocumentor and authored - on June 7th, 2019 at 20:25. + on June 24th, 2019 at 20:28.
diff --git a/docs/files/includes/class-fontawesome-config-controller.php.txt b/docs/files/includes/class-fontawesome-config-controller.php.txt index 7e07f816b..e0b76d84e 100644 --- a/docs/files/includes/class-fontawesome-config-controller.php.txt +++ b/docs/files/includes/class-fontawesome-config-controller.php.txt @@ -137,8 +137,9 @@ if ( ! class_exists( 'FortAwesome\FontAwesome_Config_Controller' ) ) : // Ideally, we'd be able to detect which plugin results in such an error by catching it and then // reporting to the client which plugin caused the error. But at a minimum, we need to make sure // that we return 500 instead of 200 in these cases. - // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_ini_set + // phpcs:disable ini_set( 'display_errors', 0 ); + // phpcs:enable try { $fa = fa(); @@ -170,8 +171,9 @@ if ( ! class_exists( 'FortAwesome\FontAwesome_Config_Controller' ) ) : * @return WP_Error|WP_REST_Response */ public function update_item( $request ) { - // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_ini_set + // phpcs:disable ini_set( 'display_errors', 0 ); + // phpcs:enable try { $item = $this->prepare_item_for_database( $request ); diff --git a/docs/files/includes/class-fontawesome.php.txt b/docs/files/includes/class-fontawesome.php.txt index 6f57719c9..f24ebfb1d 100644 --- a/docs/files/includes/class-fontawesome.php.txt +++ b/docs/files/includes/class-fontawesome.php.txt @@ -100,7 +100,7 @@ if ( ! class_exists( 'FortAwesome\FontAwesome' ) ) : /** * The version of this WordPress plugin. */ - const PLUGIN_VERSION = '4.0.0-rc10'; + const PLUGIN_VERSION = '4.0.0-rc11'; /** * The version of this plugin's REST API. * @@ -1344,13 +1344,15 @@ if ( ! class_exists( 'FortAwesome\FontAwesome' ) ) : if ( 'webfont' === $load_spec['method'] ) { - add_action( - 'wp_enqueue_scripts', - function () use ( $resource_collection ) { - // phpcs:ignore WordPress.WP.EnqueuedResourceParameters - wp_enqueue_style( self::RESOURCE_HANDLE, $resource_collection[0]->source(), null, null ); - } - ); + foreach ( [ 'wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ] as $action ) { + add_action( + $action, + function () use ( $resource_collection ) { + // phpcs:ignore WordPress.WP.EnqueuedResourceParameters + wp_enqueue_style( self::RESOURCE_HANDLE, $resource_collection[0]->source(), null, null ); + } + ); + } // Filter the tag to add the integrity and crossorigin attributes for completeness. add_filter( @@ -1374,17 +1376,18 @@ if ( ! class_exists( 'FortAwesome\FontAwesome' ) ) : if ( $load_spec['v4shim'] ) { /** - * Enqueue v4 compatibility as late as possible, though still within the normal wp_enqueue_scripts hook. + * Enqueue v4 compatibility as late as possible, though still within the normal script enqueue hooks. * We need the @font-face override, especially to appear after any unregistered loads of Font Awesome * that may try to declare a @font-face with a font-family of "FontAwesome". */ - add_action( - 'wp_enqueue_scripts', - function () use ( $resource_collection, $options, $license_subdomain, $version ) { - // phpcs:ignore WordPress.WP.EnqueuedResourceParameters - wp_enqueue_style( self::RESOURCE_HANDLE_V4SHIM, $resource_collection[1]->source(), null, null ); + foreach ( [ 'wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ] as $action ) { + add_action( + $action, + function () use ( $resource_collection, $options, $license_subdomain, $version ) { + // phpcs:ignore WordPress.WP.EnqueuedResourceParameters + wp_enqueue_style( self::RESOURCE_HANDLE_V4SHIM, $resource_collection[1]->source(), null, null ); - $font_face = <<< EOT + $font_face = <<< EOT @font-face { font-family: "FontAwesome"; src: url("https://${license_subdomain}.fontawesome.com/releases/v${version}/webfonts/fa-brands-400.eot"), @@ -1417,14 +1420,15 @@ if ( ! class_exists( 'FortAwesome\FontAwesome' ) ) : } EOT; - wp_add_inline_style( - self::RESOURCE_HANDLE_V4SHIM, - $font_face - ); + wp_add_inline_style( + self::RESOURCE_HANDLE_V4SHIM, + $font_face + ); - }, - PHP_INT_MAX - ); + }, + PHP_INT_MAX + ); + } // Filter the tag to add the integrity and crossorigin attributes for completeness. // Not all resources have an integrity_key for all versions of Font Awesome, so we'll skip this for those @@ -1451,17 +1455,19 @@ EOT; } } } else { - add_action( - 'wp_enqueue_scripts', - function () use ( $resource_collection, $load_spec ) { - // phpcs:ignore WordPress.WP.EnqueuedResourceParameters - wp_enqueue_script( self::RESOURCE_HANDLE, $resource_collection[0]->source(), null, null, false ); + foreach ( [ 'wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ] as $action ) { + add_action( + $action, + function () use ( $resource_collection, $load_spec ) { + // phpcs:ignore WordPress.WP.EnqueuedResourceParameters + wp_enqueue_script( self::RESOURCE_HANDLE, $resource_collection[0]->source(), null, null, false ); - if ( $load_spec['pseudoElements'] ) { - wp_add_inline_script( self::RESOURCE_HANDLE, 'FontAwesomeConfig = { searchPseudoElements: true };', 'before' ); + if ( $load_spec['pseudoElements'] ) { + wp_add_inline_script( self::RESOURCE_HANDLE, 'FontAwesomeConfig = { searchPseudoElements: true };', 'before' ); + } } - } - ); + ); + } // Filter the