From 218272bbcbba3e25602ef3dc93aa258b10cd5fe8 Mon Sep 17 00:00:00 2001
From: Lai Power
Date: Thu, 28 Mar 2024 09:40:06 +0000
Subject: [PATCH] updated plugin `W3 Total Cache` version 2.7.0
---
.../BrowserCache_ConfigLabels.php | 4 +-
.../BrowserCache_Environment_Nginx.php | 4 +-
.../w3-total-cache/CacheFlush_Locally.php | 5 +-
.../CacheGroups_Plugin_Admin.php | 34 +-
.../w3-total-cache/Cache_Memcached.php | 2 +-
.../w3-total-cache/Cdn_BunnyCdn_Page_View.js | 1 -
.../w3-total-cache/Cdn_BunnyCdn_Widget.php | 2 +-
.../Cdn_GoogleDrive_Page_View.js | 3 +
.../w3-total-cache/Cdn_Highwinds_Page_View.js | 1 -
.../w3-total-cache/Cdn_Highwinds_Widget.php | 105 ----
.../Cdn_Highwinds_Widget_View.css | 15 -
.../Cdn_Highwinds_Widget_View.js | 45 --
.../Cdn_Highwinds_Widget_View.php | 60 ---
...dn_Highwinds_Widget_View_NotConfigured.php | 28 -
.../w3-total-cache/Cdn_LimeLight_Page_View.js | 1 -
.../w3-total-cache/Cdn_LimeLight_Popup.php | 2 +-
.../w3-total-cache/Cdn_Plugin_Admin.php | 11 +-
.../Cdn_RackSpaceCdn_Page_View.js | 1 -
.../Cdn_RackSpaceCloudFiles_Page_View.js | 1 -
.../Cdn_StackPath2_Page_View.js | 1 -
.../w3-total-cache/Cdn_StackPath2_Widget.php | 125 -----
.../Cdn_StackPath2_Widget_View.css | 78 ---
.../Cdn_StackPath2_Widget_View.js | 46 --
.../Cdn_StackPath2_Widget_View_Authorized.php | 59 --
...dn_StackPath2_Widget_View_Unauthorized.php | 65 ---
.../w3-total-cache/Cdn_StackPath_Page_View.js | 1 -
.../w3-total-cache/Cdn_StackPath_Widget.php | 141 -----
.../Cdn_StackPath_Widget_View.css | 98 ----
.../Cdn_StackPath_Widget_View.js | 62 ---
.../Cdn_StackPath_Widget_View_Authorized.php | 93 ----
...Cdn_StackPath_Widget_View_Unauthorized.php | 42 --
.../Cdnfsd_BunnyCdn_Page_View.js | 1 -
.../Cdnfsd_CloudFront_Page_View.js | 1 -
.../plugins/w3-total-cache/Cdnfsd_Core.php | 2 +-
.../Cdnfsd_LimeLight_Page_View.js | 1 -
.../Cdnfsd_StackPath2_Page_View.js | 1 -
.../Cdnfsd_StackPath_Page_View.js | 1 -
.../plugins/w3-total-cache/ConfigKeys.php | 4 -
.../Extension_CloudFlare_Page_View.js | 1 -
.../Extension_CloudFlare_Widget.php | 2 +-
.../Extension_ImageService_Widget.js | 185 +++++++
.../Extension_ImageService_Widget.php | 118 ++++
.../Extension_ImageService_Widget_View.php | 52 ++
.../Extension_NewRelic_Popup_View.js | 3 +
.../Extension_NewRelic_Widget.php | 5 +-
.../Extension_Swarmify_Plugin_Admin.php | 4 -
.../Extension_Swarmify_Widget.php | 237 --------
.../Extension_Swarmify_Widget_View.css | 33 --
...ion_Swarmify_Widget_View_NotConfigured.php | 17 -
.../w3-total-cache/Extensions_Page.php | 37 +-
.../FeatureShowcase_Plugin_Admin.php | 18 +
.../FeatureShowcase_Plugin_Admin_View.php | 5 +-
.../Generic_GeneralPage_View_ShowEdge.js | 5 +-
.../Generic_GeneralPage_View_ShowSupportUs.js | 1 +
.../Generic_Page_Dashboard_View.css | 335 ++++++++----
.../w3-total-cache/Generic_Page_Install.php | 1 +
.../plugins/w3-total-cache/Generic_Plugin.php | 1 +
.../w3-total-cache/Generic_Plugin_Admin.php | 31 +-
.../Generic_Plugin_WidgetForum.php | 151 ------
.../Generic_Plugin_WidgetNews.php | 155 ------
.../w3-total-cache/Generic_WidgetAccount.php | 58 ++
.../Generic_WidgetAccount_View.php | 77 +++
.../w3-total-cache/Generic_WidgetBoldGrid.php | 2 +-
.../Generic_WidgetCommunity.php | 53 --
.../Generic_WidgetCommunity_View.php | 40 --
.../w3-total-cache/Generic_WidgetPartners.php | 58 ++
.../Generic_WidgetPartners_View.php | 37 ++
.../w3-total-cache/Generic_WidgetServices.php | 6 +-
.../w3-total-cache/Generic_WidgetSettings.php | 56 ++
.../Generic_WidgetSettings_View.php | 98 ++++
.../Generic_WidgetSpreadTheWord_Plugin.php | 12 +-
.../w3-total-cache/Generic_WidgetStats.js | 110 ++++
.../w3-total-cache/Generic_WidgetStats.php | 170 ++++++
.../plugins/w3-total-cache/Minify_Core.php | 51 +-
.../Minify_GeneralPage_View_ShowHelp.js | 27 +-
.../Minify_MinifiedFileRequestHandler.php | 22 +-
.../w3-total-cache/Minify_Plugin_Admin.php | 8 +-
.../plugins/w3-total-cache/PageSpeed_Data.php | 504 +++++++++---------
.../w3-total-cache/PageSpeed_Instructions.php | 25 +-
.../plugins/w3-total-cache/PageSpeed_Page.php | 2 +-
.../w3-total-cache/PageSpeed_Widget.php | 26 +-
.../w3-total-cache/PageSpeed_Widget_View.css | 30 +-
.../w3-total-cache/PageSpeed_Widget_View.js | 1 -
.../PageSpeed_Widget_View_FromApi.php | 12 +-
.../plugins/w3-total-cache/Root_Loader.php | 7 +-
.../w3-total-cache/UsageStatistics_Page.php | 7 +-
.../UsageStatistics_Plugin_Admin.php | 8 -
.../w3-total-cache/UsageStatistics_Widget.php | 55 --
.../UsageStatistics_Widget_View.js | 208 --------
.../UsageStatistics_Widget_View.php | 55 --
.../UsageStatistics_Widget_View_Disabled.php | 37 --
.../UserExperience_DeferScripts_Extension.php | 4 +-
.../UserExperience_DeferScripts_Page_View.php | 2 +-
.../UserExperience_GeneralPage_View.php | 35 +-
.../UserExperience_LazyLoad_Mutator.php | 2 +-
...rExperience_LazyLoad_Mutator_Unmutable.php | 2 +-
.../UserExperience_Plugin_Admin.php | 26 +-
...rExperience_Preload_Requests_Extension.php | 8 +-
...rExperience_Preload_Requests_Page_View.php | 81 +--
.../UserExperience_Remove_CssJs_Extension.php | 254 +++++++++
.../UserExperience_Remove_CssJs_Mutator.php | 167 ++++++
.../UserExperience_Remove_CssJs_Page_View.js | 83 +++
.../UserExperience_Remove_CssJs_Page_View.php | 89 ++++
.../plugins/w3-total-cache/Util_Installed.php | 29 +-
.../plugins/w3-total-cache/Util_PageSpeed.php | 56 +-
.../plugins/w3-total-cache/Util_PageUrls.php | 10 +-
wp-content/plugins/w3-total-cache/Util_Ui.php | 17 +-
.../w3-total-cache/inc/lightbox/purchase.php | 4 +-
.../w3-total-cache/inc/lightbox/upgrade.php | 33 +-
.../inc/options/browsercache.php | 93 +++-
.../w3-total-cache/inc/options/cdn.php | 10 +-
.../inc/options/common/footer.php | 6 +
.../w3-total-cache/inc/options/dashboard.php | 75 +--
.../inc/options/extensions/list.php | 14 +-
.../w3-total-cache/inc/options/general.php | 10 -
.../w3-total-cache/inc/options/pgcache.php | 12 +-
.../lib/Minify/Minify/CSS/Compressor.php | 3 +
.../lib/Minify/Minify/Cache/File.php | 12 +-
.../w3-total-cache/lib/Minify/Minify/HTML.php | 5 +
.../w3-total-cache/pub/css/lightbox.css | 62 ++-
.../w3-total-cache/pub/css/options.css | 54 +-
.../plugins/w3-total-cache/pub/css/widget.css | 51 +-
.../plugins/w3-total-cache/pub/img/a2.png | Bin 0 -> 22741 bytes
.../w3-total-cache/pub/img/convesio.png | Bin 0 -> 490854 bytes
.../w3-total-cache/pub/img/dreamhost.png | Bin 0 -> 124889 bytes
.../plugins/w3-total-cache/pub/img/imh.png | Bin 0 -> 3734 bytes
.../pub/img/w3tc-stats-database-cache.png | Bin 0 -> 12246 bytes
.../pub/img/w3tc-stats-object-cache.png | Bin 0 -> 13601 bytes
.../pub/img/w3tc-stats-page-cache.png | Bin 0 -> 12492 bytes
.../pub/img/w3tc-webp-converter.png | Bin 0 -> 24418 bytes
.../w3-total-cache/pub/js/google-charts.js | 160 ++++++
.../pub/js/jquery.masonry.min.js | 17 +-
.../plugins/w3-total-cache/pub/js/lightbox.js | 111 ++--
.../plugins/w3-total-cache/pub/js/options.js | 10 +-
wp-content/plugins/w3-total-cache/readme.txt | 22 +-
.../w3-total-cache/vendor/autoload.php | 2 +-
.../vendor/composer/autoload_real.php | 14 +-
.../vendor/composer/autoload_static.php | 8 +-
.../w3-total-cache/w3-total-cache-api.php | 6 +-
.../plugins/w3-total-cache/w3-total-cache.php | 2 +-
140 files changed, 3054 insertions(+), 3013 deletions(-)
delete mode 100644 wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget.php
delete mode 100644 wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget_View.css
delete mode 100644 wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget_View.js
delete mode 100644 wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget_View.php
delete mode 100644 wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget_View_NotConfigured.php
delete mode 100644 wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget.php
delete mode 100644 wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget_View.css
delete mode 100644 wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget_View.js
delete mode 100644 wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget_View_Authorized.php
delete mode 100644 wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget_View_Unauthorized.php
delete mode 100644 wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget.php
delete mode 100644 wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget_View.css
delete mode 100644 wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget_View.js
delete mode 100644 wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget_View_Authorized.php
delete mode 100644 wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget_View_Unauthorized.php
create mode 100644 wp-content/plugins/w3-total-cache/Extension_ImageService_Widget.js
create mode 100644 wp-content/plugins/w3-total-cache/Extension_ImageService_Widget.php
create mode 100644 wp-content/plugins/w3-total-cache/Extension_ImageService_Widget_View.php
delete mode 100644 wp-content/plugins/w3-total-cache/Extension_Swarmify_Widget.php
delete mode 100644 wp-content/plugins/w3-total-cache/Extension_Swarmify_Widget_View.css
delete mode 100644 wp-content/plugins/w3-total-cache/Extension_Swarmify_Widget_View_NotConfigured.php
delete mode 100644 wp-content/plugins/w3-total-cache/Generic_Plugin_WidgetForum.php
delete mode 100644 wp-content/plugins/w3-total-cache/Generic_Plugin_WidgetNews.php
create mode 100644 wp-content/plugins/w3-total-cache/Generic_WidgetAccount.php
create mode 100644 wp-content/plugins/w3-total-cache/Generic_WidgetAccount_View.php
delete mode 100644 wp-content/plugins/w3-total-cache/Generic_WidgetCommunity.php
delete mode 100644 wp-content/plugins/w3-total-cache/Generic_WidgetCommunity_View.php
create mode 100644 wp-content/plugins/w3-total-cache/Generic_WidgetPartners.php
create mode 100644 wp-content/plugins/w3-total-cache/Generic_WidgetPartners_View.php
create mode 100644 wp-content/plugins/w3-total-cache/Generic_WidgetSettings.php
create mode 100644 wp-content/plugins/w3-total-cache/Generic_WidgetSettings_View.php
create mode 100644 wp-content/plugins/w3-total-cache/Generic_WidgetStats.js
create mode 100644 wp-content/plugins/w3-total-cache/Generic_WidgetStats.php
delete mode 100644 wp-content/plugins/w3-total-cache/UsageStatistics_Widget.php
delete mode 100644 wp-content/plugins/w3-total-cache/UsageStatistics_Widget_View.js
delete mode 100644 wp-content/plugins/w3-total-cache/UsageStatistics_Widget_View.php
delete mode 100644 wp-content/plugins/w3-total-cache/UsageStatistics_Widget_View_Disabled.php
create mode 100644 wp-content/plugins/w3-total-cache/UserExperience_Remove_CssJs_Extension.php
create mode 100644 wp-content/plugins/w3-total-cache/UserExperience_Remove_CssJs_Mutator.php
create mode 100644 wp-content/plugins/w3-total-cache/UserExperience_Remove_CssJs_Page_View.js
create mode 100644 wp-content/plugins/w3-total-cache/UserExperience_Remove_CssJs_Page_View.php
create mode 100644 wp-content/plugins/w3-total-cache/pub/img/a2.png
create mode 100644 wp-content/plugins/w3-total-cache/pub/img/convesio.png
create mode 100644 wp-content/plugins/w3-total-cache/pub/img/dreamhost.png
create mode 100644 wp-content/plugins/w3-total-cache/pub/img/imh.png
create mode 100644 wp-content/plugins/w3-total-cache/pub/img/w3tc-stats-database-cache.png
create mode 100644 wp-content/plugins/w3-total-cache/pub/img/w3tc-stats-object-cache.png
create mode 100644 wp-content/plugins/w3-total-cache/pub/img/w3tc-stats-page-cache.png
create mode 100644 wp-content/plugins/w3-total-cache/pub/img/w3tc-webp-converter.png
create mode 100644 wp-content/plugins/w3-total-cache/pub/js/google-charts.js
diff --git a/wp-content/plugins/w3-total-cache/BrowserCache_ConfigLabels.php b/wp-content/plugins/w3-total-cache/BrowserCache_ConfigLabels.php
index b47de148..1ff90916 100644
--- a/wp-content/plugins/w3-total-cache/BrowserCache_ConfigLabels.php
+++ b/wp-content/plugins/w3-total-cache/BrowserCache_ConfigLabels.php
@@ -35,8 +35,8 @@ class BrowserCache_ConfigLabels {
'browsercache.other.cache.policy' => __( 'Cache Control policy:', 'w3-total-cache' ),
'browsercache.other.etag' => __( 'Set entity tag (ETag)', 'w3-total-cache' ),
'browsercache.other.w3tc' => __( 'Set W3 Total Cache header', 'w3-total-cache' ),
- 'browsercache.other.compression' => __( 'Enable HTTP (gzip) compression', 'w3-total-cache' ),
- 'browsercache.other.brotli' => __( 'Enable HTTP (brotli) compression', 'w3-total-cache' ),
+ 'browsercache.other.compression' => __( 'Enable HTTP (gzip) compression', 'w3-total-cache' ),
+ 'browsercache.other.brotli' => __( 'Enable HTTP (brotli) compression', 'w3-total-cache' ),
'browsercache.other.replace' => __( 'Prevent caching of objects after settings change', 'w3-total-cache' ),
'browsercache.other.nocookies' => __( 'Disable cookies for static files', 'w3-total-cache' ),
'browsercache.security.session.cookie_httponly' => __( 'Access session cookies through the HTTP only:', 'w3-total-cache' ),
diff --git a/wp-content/plugins/w3-total-cache/BrowserCache_Environment_Nginx.php b/wp-content/plugins/w3-total-cache/BrowserCache_Environment_Nginx.php
index 90b9b566..9a92136b 100644
--- a/wp-content/plugins/w3-total-cache/BrowserCache_Environment_Nginx.php
+++ b/wp-content/plugins/w3-total-cache/BrowserCache_Environment_Nginx.php
@@ -344,11 +344,11 @@ class BrowserCache_Environment_Nginx {
}
if ( ! empty( $feature_v ) ) {
- $rules[] = ' Header set Feature-Policy "' . implode( ';', $feature_v ) . "\"\n";
+ $rules[] = 'add_header Feature-Policy "' . implode( ';', $feature_v ) . "\"\n";
}
if ( ! empty( $permission_v ) ) {
- $rules[] = ' Header set Permissions-Policy "' . implode( ',', $permission_v ) . "\"\n";
+ $rules[] = 'add_header Permissions-Policy "' . implode( ',', $permission_v ) . "\"\n";
}
}
}
diff --git a/wp-content/plugins/w3-total-cache/CacheFlush_Locally.php b/wp-content/plugins/w3-total-cache/CacheFlush_Locally.php
index 37e22ab0..bfd8d7eb 100644
--- a/wp-content/plugins/w3-total-cache/CacheFlush_Locally.php
+++ b/wp-content/plugins/w3-total-cache/CacheFlush_Locally.php
@@ -74,16 +74,13 @@ class CacheFlush_Locally {
do_action( 'w3tc_flush_minify' );
$minifycache = Dispatcher::component( 'Minify_MinifiedFileRequestHandler' );
- $v = $minifycache->flush();
+ $v = $minifycache->flush( $extras );
do_action( 'w3tc_flush_after_minify' );
return $v;
}
function minifycache_flush_all( $extras = array() ) {
- if ( isset( $extras['minify'] ) && $extras['minify'] == 'purge_map' )
- delete_option( 'w3tc_minify' );
-
$this->minifycache_flush( $extras );
}
diff --git a/wp-content/plugins/w3-total-cache/CacheGroups_Plugin_Admin.php b/wp-content/plugins/w3-total-cache/CacheGroups_Plugin_Admin.php
index 63e9a4c4..a815c4a5 100644
--- a/wp-content/plugins/w3-total-cache/CacheGroups_Plugin_Admin.php
+++ b/wp-content/plugins/w3-total-cache/CacheGroups_Plugin_Admin.php
@@ -148,12 +148,8 @@ class CacheGroups_Plugin_Admin extends Base_Page_Settings {
$group_config
);
- $mobile_groups[ $group ]['agents'] = array_unique(
- array_map(
- 'strtolower',
- $mobile_groups[ $group ]['agents']
- )
- );
+ $mobile_groups[ $group ]['agents'] = self::clean_values( $mobile_groups[ $group ]['agents'] );
+
sort( $mobile_groups[ $group ]['agents'] );
}
@@ -209,12 +205,8 @@ class CacheGroups_Plugin_Admin extends Base_Page_Settings {
$group_config
);
- $referrer_groups[ $group ]['referrers'] = array_unique(
- array_map(
- 'strtolower',
- $referrer_groups[ $group ]['referrers']
- )
- );
+ $referrer_groups[ $group ]['referrers'] = self::clean_values( $referrer_groups[ $group ]['referrers'] );
+
sort( $referrer_groups[ $group ]['referrers'] );
}
@@ -268,4 +260,22 @@ class CacheGroups_Plugin_Admin extends Base_Page_Settings {
$config->set( 'pgcache.cookiegroups.enabled', $enabled );
$config->set( 'pgcache.cookiegroups.groups', $cookiegroups );
}
+
+ /**
+ * Clean entries.
+ *
+ * @static
+ *
+ * @param array $values Values.
+ */
+ public static function clean_values( $values ) {
+ return array_unique(
+ array_map(
+ function ( $value ) {
+ return preg_replace( '/(?_memcache->getStats();
- if ( count( $a ) > 0 ) {
+ if ( ! empty( $a ) && count( $a ) > 0 ) {
$keys = array_keys( $a );
$key = $keys[0];
return $a[$key];
diff --git a/wp-content/plugins/w3-total-cache/Cdn_BunnyCdn_Page_View.js b/wp-content/plugins/w3-total-cache/Cdn_BunnyCdn_Page_View.js
index 4dde97aa..7c1275af 100644
--- a/wp-content/plugins/w3-total-cache/Cdn_BunnyCdn_Page_View.js
+++ b/wp-content/plugins/w3-total-cache/Cdn_BunnyCdn_Page_View.js
@@ -14,7 +14,6 @@ jQuery(function($) {
* @param object o W3tc_Lightbox object.
*/
function w3tc_bunnycdn_resize(o) {
- o.options.height = $('.w3tc_cdn_bunnycdn_form').height();
o.resize();
}
diff --git a/wp-content/plugins/w3-total-cache/Cdn_BunnyCdn_Widget.php b/wp-content/plugins/w3-total-cache/Cdn_BunnyCdn_Widget.php
index b8fe80bb..a2d50a4c 100644
--- a/wp-content/plugins/w3-total-cache/Cdn_BunnyCdn_Widget.php
+++ b/wp-content/plugins/w3-total-cache/Cdn_BunnyCdn_Widget.php
@@ -28,7 +28,7 @@ class Cdn_BunnyCdn_Widget {
Util_Widget::add2(
'w3tc_bunnycdn',
- 2000,
+ 400,
'
',
array( $o, 'widget_form' ),
Util_Ui::admin_url( 'admin.php?page=w3tc_cdn' ),
diff --git a/wp-content/plugins/w3-total-cache/Cdn_GoogleDrive_Page_View.js b/wp-content/plugins/w3-total-cache/Cdn_GoogleDrive_Page_View.js
index 9d7ae318..7ae38c5f 100644
--- a/wp-content/plugins/w3-total-cache/Cdn_GoogleDrive_Page_View.js
+++ b/wp-content/plugins/w3-total-cache/Cdn_GoogleDrive_Page_View.js
@@ -10,6 +10,9 @@ jQuery(function($) {
width: 800,
height: 500,
url: w3tc_cdn_google_drive_popup_url[0],
+ callback: function(lightbox) {
+ lightbox.resize();
+ },
onClose: function() {
}
});
diff --git a/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Page_View.js b/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Page_View.js
index 316e08bf..b565501d 100644
--- a/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Page_View.js
+++ b/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Page_View.js
@@ -1,6 +1,5 @@
jQuery(function($) {
function w3tchw_resize(o) {
- o.options.height = jQuery('.w3tc_cdn_highwinds_form').height() + 30;
o.resize();
}
diff --git a/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget.php b/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget.php
deleted file mode 100644
index 5302b200..00000000
--- a/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget.php
+++ /dev/null
@@ -1,105 +0,0 @@
-',
- array( $this, 'widget_form' ),
- Util_Ui::admin_url( 'admin.php?page=w3tc_cdn' ),
- 'normal' );
- }
-
-
-
- public function widget_form() {
- $c = Dispatcher::config();
- $account_hash = $c->get_string( 'cdn.highwinds.account_hash' );
- if ( empty( $account_hash ) ) {
- include W3TC_DIR . '/Cdn_Highwinds_Widget_View_NotConfigured.php';
- return;
- }
-
- $url_manage = 'https://striketracker3.highwinds.com/accounts/' .
- $account_hash . '/configure/hosts';
- $url_analyze = 'https://striketracker3.highwinds.com/accounts/' .
- $account_hash . '/analyze/overview';
- $url_purge = Util_Ui::url( array(
- 'page' => 'w3tc_cdn',
- 'w3tc_cdn_purge' => 'y'
- ) );
-
- include W3TC_DIR . '/Cdn_Highwinds_Widget_View.php';
- }
-
-
-
-
- public function admin_print_styles() {
- wp_enqueue_style( 'w3tc-widget' );
- wp_enqueue_style( 'w3tc-highwinds-widget',
- plugins_url( 'Cdn_Highwinds_Widget_View.css', W3TC_FILE ),
- array(), W3TC_VERSION );
- }
-
-
-
- public function admin_print_scripts() {
- wp_enqueue_script( 'google-jsapi', 'https://www.google.com/jsapi' );
- wp_enqueue_script( 'w3tc-highwinds-widget',
- plugins_url( 'Cdn_Highwinds_Widget_View.js', W3TC_FILE ),
- array(), W3TC_VERSION );
- }
-
-
-
- static public function w3tc_ajax_cdn_highwinds_widgetdata() {
- try {
- $core = Dispatcher::component( 'Cdn_Core' );
- $cdn = $core->get_cdn();
-
- $analytics = $cdn->service_analytics_transfer();
-
- $sum_mbytes = 0;
- $sum_mbps = 0;
- $sum_rps = 0;
- $graph = array( array( 'Date', 'Requests' ) );
- $count = count( $analytics );
-
- foreach ( $analytics as $item ) {
- $sum_mbytes += $item['xferUsedTotalMB'];
- $sum_mbps += $item['xferRateMeanMbps'];
- $sum_rps += $item['rpsMean'];
- $graph[] = array(
- gmdate( 'd M', $item['usageTime'] / 1000 ),
- $item['requestsCountTotal']
- );
- }
-
- $response = array(
- 'transferred_size' => Util_Ui::format_mbytes( $sum_mbytes / $count ),
- 'average_mbps' => sprintf( '%.2f', $sum_mbps / $count ),
- 'average_rps' => sprintf( '%.2f', $sum_rps / $count ),
- 'graph' => $graph
- );
-
- echo json_encode( $response );
- } catch ( \Exception $e ) {
- echo json_encode( array(
- 'error' => $e->getMessage()
- ) );
- }
- }
-}
diff --git a/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget_View.css b/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget_View.css
deleted file mode 100644
index fe22a8ea..00000000
--- a/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget_View.css
+++ /dev/null
@@ -1,15 +0,0 @@
-.w3tc-widget-highwinds-logo {
- float: left;
- width: 65px;
- height: 35px;
- background: url("pub/img/cdn-highwinds-logo.png") 0 0 no-repeat;
-}
-
-.w3tchw_tools li {
- display: inline-block;
- margin-right: 10px;
-}
-
-#w3tchw_report li {
- margin-bottom: 0;
-}
\ No newline at end of file
diff --git a/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget_View.js b/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget_View.js
deleted file mode 100644
index d331d00d..00000000
--- a/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget_View.js
+++ /dev/null
@@ -1,45 +0,0 @@
-var w3tchw_graph_data;
-
-function w3tchw_load() {
- jQuery('.w3tchw_loading').removeClass('w3tc_hidden');
- jQuery('.w3tchw_content').addClass('w3tc_hidden');
- jQuery('.w3tchw_error').addClass('w3tc_none');
-
- jQuery.getJSON(ajaxurl + '?action=w3tc_ajax&_wpnonce=' + w3tc_nonce +
- '&w3tc_action=cdn_highwinds_widgetdata',
- function(data) {
- if (data && data.error) {
- jQuery('.w3tchw_error').removeClass('w3tc_none');
- jQuery('.w3tchw_error_details').html(data.error);
- jQuery('.w3tchw_loading').addClass('w3tc_hidden');
- return;
- }
-
- for (p in data) {
- var v = data[p];
- jQuery('.w3tchw_' + p).html(v);
- }
-
- var data = google.visualization.arrayToDataTable(data.graph);
- var options = {
- legend: { position: "none" },
- bars: 'horizontal'
- };
-
- var chart = new google.charts.Bar(document.getElementById('w3tchw_chart'));
- chart.draw(data, options);
-
- jQuery('.w3tchw_content').removeClass('w3tc_hidden');
- jQuery('.w3tchw_loading').addClass('w3tc_hidden');
- }
- ).fail(function() {
- jQuery('.w3tchw_error').removeClass('w3tc_none');
- jQuery('.w3tchw_content').addClass('w3tc_hidden');
- jQuery('.w3tchw_loading').addClass('w3tc_hidden');
- });
-}
-
-
-
-google.load("visualization", "1.1", {packages:["bar"]});
-google.setOnLoadCallback(w3tchw_load);
diff --git a/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget_View.php b/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget_View.php
deleted file mode 100644
index 04168836..00000000
--- a/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget_View.php
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
-
-
Loading...
-
-
-
-
-
-
- Transferred:
- Average rate Mb/s:
- Average requests/s:
-
-
-
-
-
diff --git a/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget_View_NotConfigured.php b/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget_View_NotConfigured.php
deleted file mode 100644
index f04fbe9b..00000000
--- a/wp-content/plugins/w3-total-cache/Cdn_Highwinds_Widget_View_NotConfigured.php
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
- Not configured
-
diff --git a/wp-content/plugins/w3-total-cache/Cdn_LimeLight_Page_View.js b/wp-content/plugins/w3-total-cache/Cdn_LimeLight_Page_View.js
index 2ea809b8..130df457 100644
--- a/wp-content/plugins/w3-total-cache/Cdn_LimeLight_Page_View.js
+++ b/wp-content/plugins/w3-total-cache/Cdn_LimeLight_Page_View.js
@@ -1,6 +1,5 @@
jQuery(function($) {
function w3tc_popup_resize(o) {
- o.options.height = jQuery('.w3tc_popup_form').height() + 30;
o.resize();
}
diff --git a/wp-content/plugins/w3-total-cache/Cdn_LimeLight_Popup.php b/wp-content/plugins/w3-total-cache/Cdn_LimeLight_Popup.php
index dfc314bf..87a0c989 100644
--- a/wp-content/plugins/w3-total-cache/Cdn_LimeLight_Popup.php
+++ b/wp-content/plugins/w3-total-cache/Cdn_LimeLight_Popup.php
@@ -3,7 +3,7 @@ namespace W3TC;
-class Cdnfsd_LimeLight_Popup {
+class Cdn_LimeLight_Popup {
static public function w3tc_ajax() {
$o = new Cdnfsd_LimeLight_Popup();
diff --git a/wp-content/plugins/w3-total-cache/Cdn_Plugin_Admin.php b/wp-content/plugins/w3-total-cache/Cdn_Plugin_Admin.php
index 03f789f2..457278dd 100644
--- a/wp-content/plugins/w3-total-cache/Cdn_Plugin_Admin.php
+++ b/wp-content/plugins/w3-total-cache/Cdn_Plugin_Admin.php
@@ -36,6 +36,9 @@ class Cdn_Plugin_Admin {
}
}
+ // Always show the Bunny CDN widget on dashboard.
+ \add_action( 'admin_init_w3tc_dashboard', array( '\W3TC\Cdn_BunnyCdn_Widget', 'admin_init_w3tc_dashboard' ) );
+
// Attach to actions without firing class loading at all without need.
switch ( $cdn_engine ) {
case 'google_drive':
@@ -43,8 +46,6 @@ class Cdn_Plugin_Admin {
break;
case 'highwinds':
\add_action( 'w3tc_ajax', array( '\W3TC\Cdn_Highwinds_Popup', 'w3tc_ajax' ) );
- \add_action( 'admin_init_w3tc_dashboard', array( '\W3TC\Cdn_Highwinds_Widget', 'admin_init_w3tc_dashboard' ) );
- \add_action( 'w3tc_ajax_cdn_highwinds_widgetdata', array( '\W3TC\Cdn_Highwinds_Widget', 'w3tc_ajax_cdn_highwinds_widgetdata' ) );
\add_action( 'w3tc_settings_cdn_boxarea_configuration', array( '\W3TC\Cdn_Highwinds_Page', 'w3tc_settings_cdn_boxarea_configuration' ) );
break;
case 'limelight':
@@ -63,23 +64,17 @@ class Cdn_Plugin_Admin {
case 'stackpath':
\add_action( 'w3tc_ajax', array( '\W3TC\Cdn_StackPath_Popup', 'w3tc_ajax' ) );
\add_action( 'w3tc_settings_cdn_boxarea_configuration', array( '\W3TC\Cdn_StackPath_Page', 'w3tc_settings_cdn_boxarea_configuration' ) );
- \add_action( 'admin_init_w3tc_dashboard', array( '\W3TC\Cdn_StackPath_Widget', 'admin_init_w3tc_dashboard' ) );
- \add_action( 'w3tc_ajax_cdn_stackpath_widgetdata', array( '\W3TC\Cdn_StackPath_Widget', 'w3tc_ajax_cdn_stackpath_widgetdata' ) );
break;
case 'stackpath2':
\add_action( 'w3tc_ajax', array( '\W3TC\Cdn_StackPath2_Popup', 'w3tc_ajax' ) );
\add_action( 'w3tc_settings_cdn_boxarea_configuration', array( '\W3TC\Cdn_StackPath2_Page', 'w3tc_settings_cdn_boxarea_configuration' ) );
- \add_action( 'admin_init_w3tc_dashboard', array( '\W3TC\Cdn_StackPath2_Widget', 'admin_init_w3tc_dashboard' ) );
- \add_action( 'w3tc_ajax_cdn_stackpath2_widgetdata', array( '\W3TC\Cdn_StackPath2_Widget', 'w3tc_ajax_cdn_stackpath2_widgetdata' ) );
break;
case 'bunnycdn':
\add_action( 'w3tc_ajax', array( '\W3TC\Cdn_BunnyCdn_Page', 'w3tc_ajax' ) );
\add_action( 'w3tc_ajax', array( '\W3TC\Cdn_BunnyCdn_Popup', 'w3tc_ajax' ) );
\add_action( 'w3tc_settings_cdn_boxarea_configuration', array( '\W3TC\Cdn_BunnyCdn_Page', 'w3tc_settings_cdn_boxarea_configuration' ) );
- \add_action( 'admin_init_w3tc_dashboard', array( '\W3TC\Cdn_BunnyCdn_Widget', 'admin_init_w3tc_dashboard' ) );
\add_action( 'w3tc_ajax_cdn_bunnycdn_widgetdata', array( '\W3TC\Cdn_BunnyCdn_Widget', 'w3tc_ajax_cdn_bunnycdn_widgetdata' ) );
\add_action( 'w3tc_purge_urls_box', array( '\W3TC\Cdn_BunnyCdn_Page', 'w3tc_purge_urls_box' ) );
- // \add_filter( 'w3tc_dashboard_actions', array( '\W3TC\Cdn_BunnyCdn_Page', 'w3tc_dashboard_actions' ) ); // @todo Revisit this item.
break;
default:
\add_action( 'admin_init_w3tc_dashboard', array( '\W3TC\Cdn_BunnyCdn_Widget', 'admin_init_w3tc_dashboard' ) );
diff --git a/wp-content/plugins/w3-total-cache/Cdn_RackSpaceCdn_Page_View.js b/wp-content/plugins/w3-total-cache/Cdn_RackSpaceCdn_Page_View.js
index 0aa715e2..26e3e2f7 100644
--- a/wp-content/plugins/w3-total-cache/Cdn_RackSpaceCdn_Page_View.js
+++ b/wp-content/plugins/w3-total-cache/Cdn_RackSpaceCdn_Page_View.js
@@ -1,6 +1,5 @@
jQuery(function($) {
function w3tc_rackspace_resize(o) {
- o.options.height = jQuery('.w3tc_cdn_rackspace_form').height() + 30;
o.resize();
}
diff --git a/wp-content/plugins/w3-total-cache/Cdn_RackSpaceCloudFiles_Page_View.js b/wp-content/plugins/w3-total-cache/Cdn_RackSpaceCloudFiles_Page_View.js
index 1fa25a90..b9ce0589 100644
--- a/wp-content/plugins/w3-total-cache/Cdn_RackSpaceCloudFiles_Page_View.js
+++ b/wp-content/plugins/w3-total-cache/Cdn_RackSpaceCloudFiles_Page_View.js
@@ -1,6 +1,5 @@
jQuery(function($) {
function w3tc_rackspace_resize(o) {
- o.options.height = jQuery('.w3tc_cdn_rackspace_form').height() + 30;
o.resize();
}
diff --git a/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Page_View.js b/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Page_View.js
index 1c369aca..7f1b5f17 100644
--- a/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Page_View.js
+++ b/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Page_View.js
@@ -1,6 +1,5 @@
jQuery(function($) {
function w3tc_stackpath_resize(o) {
- o.options.height = jQuery('.w3tc_cdn_stackpath2_form').height();
o.resize();
}
diff --git a/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget.php b/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget.php
deleted file mode 100644
index df583de9..00000000
--- a/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget.php
+++ /dev/null
@@ -1,125 +0,0 @@
-',
- array( $o, 'widget_form' ),
- Util_Ui::admin_url( 'admin.php?page=w3tc_cdn' ),
- 'normal' );
- }
-
- /**
- * Runs plugin
- */
- function widget_form() {
- $c = Dispatcher::config();
-
- // Configure authorize and have_zone
- $authorized = $c->get_string( 'cdn.stackpath2.client_id' ) != '' &&
- $c->get_string( 'cdn.engine' ) == 'stackpath2';
-
- if ( $authorized ) {
- include dirname( __FILE__ ) . DIRECTORY_SEPARATOR .
- 'Cdn_StackPath2_Widget_View_Authorized.php';
- } else {
- include dirname( __FILE__ ) . DIRECTORY_SEPARATOR .
- 'Cdn_StackPath2_Widget_View_Unauthorized.php';
- }
- }
-
-
-
- static function w3tc_ajax_cdn_stackpath2_widgetdata() {
- $c = Dispatcher::config();
- $cs = Dispatcher::config_state();
-
- $api = new Cdn_StackPath2_Api( array(
- 'client_id' => $c->get_string( 'cdn.stackpath2.client_id' ),
- 'client_secret' => $c->get_string( 'cdn.stackpath2.client_secret' ),
- 'stack_id' => $c->get_string( 'cdn.stackpath2.stack_id' ),
- 'access_token' => $cs->get_string( 'cdn.stackpath2.access_token' )
- ) );
-
- $stack_id = $c->get_string( 'cdn.stackpath2.stack_id' );
- $site_id = $c->get_string( 'cdn.stackpath2.site_id' );
- $response = array();
-
- try {
- $r = $api->site_metrics( $site_id, 7 );
- $series = $r['series'][0];
-
- $keys = $series['metrics'];
- $stats = array();
- foreach ($series['samples'] as $sample) {
- $row = array();
- for ( $n = 0; $n < count( $keys ); $n++ ) {
- $row[$keys[$n]] = $sample['values'][$n];
- }
-
- $stats[] = $row;
- }
-
- $total_mb = 0;
- $total_requests = 0;
- $chart_mb = array( array('Date', 'MB', 'Requests' ) );
-
- $dd = new \DateTime();
-
- foreach ($stats as $r) {
- $total_mb += $r['xferUsedTotalMB'];
- $total_requests += $r['requestsCountTotal'];
- $d = $dd->setTimestamp( (int)$r['usageTime'] );
- $chart_mb[] = array(
- $d->format( 'M/d' ),
- $r['xferUsedTotalMB'],
- $r['requestsCountTotal']
- );
- }
-
- $response['summary_mb'] = sprintf( '%.2f MB', $total_mb );
- $response['summary_requests'] = $total_requests;
- $response['chart_mb'] = $chart_mb;
-
- $response['url_manage'] =
- "https://control.stackpath.com/stacks/$stack_id/cdn/sites/$site_id/cache";
- $response['url_reports'] =
- "https://control.stackpath.com/stacks/$stack_id/cdn/sites/$site_id/overview";
- } catch ( \Exception $ex ) {
- $response['error'] = $ex->getMessage();
- }
-
- echo json_encode( $response );
- }
-
-
-
-
-
- public function admin_print_styles() {
- wp_enqueue_style( 'w3tc-widget' );
- wp_enqueue_style( 'w3tc-stackpath-widget',
- plugins_url( 'Cdn_StackPath2_Widget_View.css', W3TC_FILE ),
- array(), W3TC_VERSION );
- }
-
-
-
- public function admin_print_scripts() {
- wp_enqueue_style( 'w3tc-widget' );
- wp_enqueue_script( 'google-jsapi', 'https://www.google.com/jsapi');
- wp_enqueue_script( 'w3tc-stackpath-widget',
- plugins_url( 'Cdn_StackPath2_Widget_View.js', W3TC_FILE ),
- array( 'google-jsapi' ), W3TC_VERSION );
- wp_enqueue_script( 'w3tc-metadata' );
- wp_enqueue_script( 'w3tc-widget' );
- }
-
-}
diff --git a/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget_View.css b/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget_View.css
deleted file mode 100644
index 360e8067..00000000
--- a/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget_View.css
+++ /dev/null
@@ -1,78 +0,0 @@
-.w3tc-widget-stackpath2-logo {
- width: 150px;
- height: 35px;
- background: url("pub/img/w3tc_stackpath_logo.svg") 0 8px no-repeat;
- float: left;
-}
-
-.w3tcstackpath2_h4 {
- text-align: center;
-}
-.w3tcstackpath2_summary_h4 {
- text-align: center;
- color: #8F8F8F;
- text-align: left;
- margin: 0;
-}
-.w3tcstackpath2_summary {
- border-bottom: 1px solid #d2d2d2;
- padding-left: 10px;
- padding-right: 10px;
-}
-.w3tcstackpath2_wrapper {
- margin-left: -10px;
- margin-right: -10px;
-}
-.w3tcstackpath2_ul li {
- margin-bottom: 3px;
- padding: 0;
-}
-.w3tcstackpath2_summary_col1 {
- display: block;
- font-weight: bold;
- width: 90px;
- float:left;
-}
-.w3tcstackpath2_summary_col2 {
- display: block;
- font-weight: bold;
- width: 80px;
- float:left;
-}
-.w3tcstackpath2_tools {
- margin-top:15px;
- padding-left: 10px;
- padding-right: 10px;
-}
-.w3tcstackpath2_tools li {
- display:inline-block;
- margin-right:10px;
-}
-.w3tcstackpath2_chart {
- clear: both;
- padding-left: 10px;
- padding-right: 10px;
-}
-.w3tcstackpath2_chart p {
- color:#8F8F8F;
- margin:0;
-}
-
-.w3tcstackpath2_wrapper .button-secondary{
- margin-bottom: 3px;
-}
-
-.w3tcstackpath2_signup_h4 {
- text-align: left;
- margin-bottom: 0;
- padding-bottom: 0;
-}
-
-.w3tcstackpath2_signup p{
- margin-top: 4px;
- padding-top: 0;
-
-}
-.w3tcstackpath2_signup p span.desc {
- color:#8F8F8F;
-}
diff --git a/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget_View.js b/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget_View.js
deleted file mode 100644
index dd365e3e..00000000
--- a/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget_View.js
+++ /dev/null
@@ -1,46 +0,0 @@
-var w3tcstackpath2_graph_data;
-
-function w3tcstackpath2_load() {
- jQuery('.w3tcstackpath2_loading').removeClass('w3tc_hidden');
- jQuery('.w3tcstackpath2_content').addClass('w3tc_hidden');
- jQuery('.w3tcstackpath2_error').addClass('w3tc_none');
-
- jQuery.getJSON(ajaxurl + '?action=w3tc_ajax&_wpnonce=' + w3tc_nonce +
- '&w3tc_action=cdn_stackpath2_widgetdata',
- function(data) {
- if (data && data.error) {
- jQuery('.w3tcstackpath2_error').removeClass('w3tc_none');
- jQuery('.w3tcstackpath2_error_details').html(data.error);
- jQuery('.w3tcstackpath2_loading').addClass('w3tc_hidden');
- return;
- }
-
- for (p in data) {
- var v = data[p];
- if (p.substr(0, 4) == 'url_')
- jQuery('.w3tcstackpath2_href_' + p.substr(4)).attr('href', v);
- else
- jQuery('.w3tcstackpath2_' + p).html(v);
- }
-
- var chart_data = google.visualization.arrayToDataTable(data.chart_mb);
-
- var chart = new google.visualization.ColumnChart(
- document.getElementById('chart_div'));
- var options = {};//colors: 'blue,red'};
- chart.draw(chart_data, options);
-
- jQuery('.w3tcstackpath2_content').removeClass('w3tc_hidden');
- jQuery('.w3tcstackpath2_loading').addClass('w3tc_hidden');
- }
- ).fail(function() {
- jQuery('.w3tcstackpath2_error').removeClass('w3tc_none');
- jQuery('.w3tcstackpath2_content').addClass('w3tc_hidden');
- jQuery('.w3tcstackpath2_loading').addClass('w3tc_hidden');
- });
-}
-
-
-
-google.load("visualization", "1", {packages:["corechart"]});
-google.setOnLoadCallback(w3tcstackpath2_load);
diff --git a/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget_View_Authorized.php b/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget_View_Authorized.php
deleted file mode 100644
index 679f25ec..00000000
--- a/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget_View_Authorized.php
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-Loading...
-
-
-
diff --git a/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget_View_Unauthorized.php b/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget_View_Unauthorized.php
deleted file mode 100644
index ba9ca413..00000000
--- a/wp-content/plugins/w3-total-cache/Cdn_StackPath2_Widget_View_Unauthorized.php
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
diff --git a/wp-content/plugins/w3-total-cache/Cdn_StackPath_Page_View.js b/wp-content/plugins/w3-total-cache/Cdn_StackPath_Page_View.js
index 40aa0e97..30a7293c 100644
--- a/wp-content/plugins/w3-total-cache/Cdn_StackPath_Page_View.js
+++ b/wp-content/plugins/w3-total-cache/Cdn_StackPath_Page_View.js
@@ -1,6 +1,5 @@
jQuery(function($) {
function w3tc_stackpath_resize(o) {
- o.options.height = jQuery('.w3tc_cdn_stackpath_form').height();
o.resize();
}
diff --git a/wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget.php b/wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget.php
deleted file mode 100644
index ec2c758a..00000000
--- a/wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget.php
+++ /dev/null
@@ -1,141 +0,0 @@
-',
- array( $this, 'widget_form' ),
- Util_Ui::admin_url( 'admin.php?page=w3tc_cdn' ),
- 'normal' );
- }
-
- /**
- * Runs plugin
- */
- function widget_form() {
- $c = Dispatcher::config();
-
- // Configure authorize and have_zone
- $authorized = $c->get_string( 'cdn.stackpath.authorization_key' ) != '' &&
- $c->get_string( 'cdn.engine' ) == 'stackpath';
- $keys = explode( '+', $c->get_string( 'cdn.stackpath.authorization_key' ) );
- $authorized = $authorized && sizeof( $keys ) == 3;
- $have_zone = $c->get_string( 'cdn.stackpath.zone_id' ) != 0;
-
- if ( $authorized && $have_zone ) {
- include dirname( __FILE__ ) . DIRECTORY_SEPARATOR .
- 'Cdn_StackPath_Widget_View_Authorized.php';
- } else {
- include dirname( __FILE__ ) . DIRECTORY_SEPARATOR .
- 'Cdn_StackPath_Widget_View_Unauthorized.php';
- }
- }
-
-
-
- function w3tc_ajax_cdn_stackpath_widgetdata() {
- $c = Dispatcher::config();
-
- require_once W3TC_LIB_NETDNA_DIR . '/NetDNAPresentation.php';
- $api = Cdn_StackPath_Api::create(
- $c->get_string( 'cdn.stackpath.authorization_key' ) );
-
- $zone_id = $c->get_string( 'cdn.stackpath.zone_id' );
- $response = array();
-
- try {
- $zone_info = $api->get_site( $zone_id );
- if ( !$zone_info )
- throw new \Exception("Zone not found");
- $filetypes = $api->get_list_of_file_types_per_zone( $zone_id );
-
- if ( !isset( $filetypes['filetypes'] ) )
- $filetypes['filetypes'] = array();
-
- $group_hits = \NetDNAPresentation::group_hits_per_filetype_group(
- $filetypes['filetypes'] );
-
- $graph = array( array('Filetype', 'Hits' ) );
- $colors = array();
- foreach ( $group_hits as $group => $hits ) {
- $graph[] = array( $group, $hits );
- $colors[] = \NetDNAPresentation::get_file_group_color( $group );
- }
-
- $response['graph'] = $graph;
- $response['colors'] = $colors;
-
- $summary = $api->get_stats_per_zone( $zone_id );
-
- $response['zone_name'] = $zone_info['name'];
- $response['summary'] = $summary;
- $response['summary_size'] = Util_Ui::format_bytes( $summary['size'] );
- $response['summary_cache_hit'] = $summary['cache_hit'];
- $response['summary_cache_hit_percentage'] = $summary['hit'] ?
- ( $summary['cache_hit'] / $summary['hit'] ) * 100 :
- $summary['hit'];
- $response['summary_noncache_hit'] = $summary['noncache_hit'];
- $response['summary_noncache_hit_percentage'] = $summary['hit'] ?
- ( $summary['noncache_hit'] / $summary['hit'] ) * 100 :
- $summary['hit'];
-
- $response['filetypes'] = $filetypes;
- $popular_files = $api->get_list_of_popularfiles_per_zone( $zone_id );
- $popular_files = \NetDNAPresentation::format_popular( $popular_files );
- $response['popular_files'] = array_slice( $popular_files, 0 , 5 );
- for ($n = 0; $n < count( $response['popular_files'] ); $n++) {
- $response['popular_files'][$n]['color'] =
- \NetDNAPresentation::get_file_group_color(
- $response['popular_files'][$n]['group'] );
- }
-
- $account = $api->get_account();
- $response['account_status'] = \NetDNAPresentation::get_account_status( $account['status'] );
- $response['url_manage'] = 'https://app.stackpath.com/sites/' .
- $zone_id . '/settings';
- $response['url_reports'] = 'https://app.stackpath.com/reporting/files?zone_id=' .
- $zone_id;
- } catch ( \Exception $ex ) {
- $response['error'] = $ex->getMessage();
- }
-
- echo json_encode( $response );
- }
-
-
-
-
-
- public function admin_print_styles() {
- wp_enqueue_style( 'w3tc-widget' );
- wp_enqueue_style( 'w3tc-stackpath-widget',
- plugins_url( 'Cdn_StackPath_Widget_View.css', W3TC_FILE ),
- array(), W3TC_VERSION );
- }
-
-
-
- public function admin_print_scripts() {
- wp_enqueue_style( 'w3tc-widget' );
- wp_enqueue_script( 'google-jsapi', 'https://www.google.com/jsapi');
- wp_enqueue_script( 'w3tc-stackpath-widget',
- plugins_url( 'Cdn_StackPath_Widget_View.js', W3TC_FILE ),
- array( 'google-jsapi' ), W3TC_VERSION );
- wp_enqueue_script( 'w3tc-metadata' );
- wp_enqueue_script( 'w3tc-widget' );
- }
-
-}
diff --git a/wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget_View.css b/wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget_View.css
deleted file mode 100644
index fcd54571..00000000
--- a/wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget_View.css
+++ /dev/null
@@ -1,98 +0,0 @@
-.w3tc-widget-stackpath-logo {
- width: 150px;
- height: 35px;
- background: url("pub/img/w3tc_stackpath_logo.svg") 0 8px no-repeat;
- float: left;
-}
-
-.w3tcstackpath_h4 {
- text-align: center;
-}
-.w3tcstackpath_summary_h4 {
- text-align: center;
- color: #8F8F8F;
- text-align: left;
- margin: 0;
-}
-.w3tcstackpath_status,
-.w3tcstackpath_summary {
- border-bottom: 1px solid #d2d2d2;
- padding-left: 10px;
- padding-right: 10px;
-}
-.w3tcstackpath_wrapper {
- margin-left: -10px;
- margin-right: -10px;
-}
-.w3tcstackpath_ul li {
- margin-bottom: 3px;
- padding: 0;
-}
-.w3tcstackpath_summary_col1 {
- display: block;
- font-weight: bold;
- width: 90px;
- float:left;
-}
-.w3tcstackpath_summary_col2 {
- display: block;
- font-weight: bold;
- width: 80px;
- float:left;
-}
-.w3tcstackpath_tools {
- margin-top:15px;
- padding-left: 10px;
- padding-right: 10px;
-}
-.w3tcstackpath_tools li {
- display:inline-block;
- margin-right:10px;
-}
-ul.w3tcstackpath_file_hits li {
- line-height: 12px;
- font-size:10px;
-}
-ul.w3tcstackpath_file_hits li span {
- color: #fff;
- padding-top: 2px;
- padding-left: 5px;
-}
-.w3tcstackpath_chart {
- clear: both;
- padding-left: 10px;
- padding-right: 10px;
-}
-.w3tcstackpath_status p, .w3tcstackpath_chart p {
- color:#8F8F8F;
- margin:0;
-}
-
-.w3tcstackpath_account_status {
- font-weight: bold;
- color: #000;
-}
-.w3tcstackpath_zone_name {
- color: #c0d9e4
-}
-
-
-
-.w3tcstackpath_wrapper .button-secondary{
- margin-bottom: 3px;
-}
-
-.w3tcstackpath_signup_h4 {
- text-align: left;
- margin-bottom: 0;
- padding-bottom: 0;
-}
-
-.w3tcstackpath_signup p{
- margin-top: 4px;
- padding-top: 0;
-
-}
-.w3tcstackpath_signup p span.desc {
- color:#8F8F8F;
-}
diff --git a/wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget_View.js b/wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget_View.js
deleted file mode 100644
index b665a461..00000000
--- a/wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget_View.js
+++ /dev/null
@@ -1,62 +0,0 @@
-var w3tcstackpath_graph_data;
-
-function w3tcstackpath_load() {
- jQuery('.w3tcstackpath_loading').removeClass('w3tc_hidden');
- jQuery('.w3tcstackpath_content').addClass('w3tc_hidden');
- jQuery('.w3tcstackpath_error').addClass('w3tc_none');
-
- jQuery.getJSON(ajaxurl + '?action=w3tc_ajax&_wpnonce=' + w3tc_nonce +
- '&w3tc_action=cdn_stackpath_widgetdata',
- function(data) {
- if (data && data.error) {
- jQuery('.w3tcstackpath_error').removeClass('w3tc_none');
- jQuery('.w3tcstackpath_error_details').html(data.error);
- jQuery('.w3tcstackpath_loading').addClass('w3tc_hidden');
- return;
- }
-
- for (p in data) {
- var v = data[p];
- if (p.substr(0, 4) == 'url_')
- jQuery('.w3tcstackpath_href_' + p.substr(4)).attr('href', v);
- else
- jQuery('.w3tcstackpath_' + p).html(v);
- }
-
- var chart_data = google.visualization.arrayToDataTable(data.graph);
-
- var chart = new google.visualization.PieChart(
- document.getElementById('chart_div'));
- var options = {colors: data.colors};
- chart.draw(chart_data, options);
-
- var popuplar_html = '';
- if ( data.popular_files && data.popular_files.length > 0 ) {
- var compare = data.popular_files[0]['hit'];
- for ( var n = 0; n < data.popular_files.length; n++) {
- var file = data.popular_files[n];
- popuplar_html += '' +
- '' +
- ' ' + file.hit +
- ' ';
- }
- jQuery('.w3tcstackpath_file_hits').html(popuplar_html);
- }
-
- jQuery('.w3tcstackpath_content').removeClass('w3tc_hidden');
- jQuery('.w3tcstackpath_loading').addClass('w3tc_hidden');
- }
- ).fail(function() {
- jQuery('.w3tcstackpath_error').removeClass('w3tc_none');
- jQuery('.w3tcstackpath_content').addClass('w3tc_hidden');
- jQuery('.w3tcstackpath_loading').addClass('w3tc_hidden');
- });
-}
-
-
-
-google.load("visualization", "1", {packages:["corechart"]});
-google.setOnLoadCallback(w3tcstackpath_load);
diff --git a/wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget_View_Authorized.php b/wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget_View_Authorized.php
deleted file mode 100644
index 998ea1b3..00000000
--- a/wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget_View_Authorized.php
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-Loading...
-
-
-
diff --git a/wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget_View_Unauthorized.php b/wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget_View_Unauthorized.php
deleted file mode 100644
index 45ca7b42..00000000
--- a/wp-content/plugins/w3-total-cache/Cdn_StackPath_Widget_View_Unauthorized.php
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
diff --git a/wp-content/plugins/w3-total-cache/Cdnfsd_BunnyCdn_Page_View.js b/wp-content/plugins/w3-total-cache/Cdnfsd_BunnyCdn_Page_View.js
index 22f70900..72c0e746 100644
--- a/wp-content/plugins/w3-total-cache/Cdnfsd_BunnyCdn_Page_View.js
+++ b/wp-content/plugins/w3-total-cache/Cdnfsd_BunnyCdn_Page_View.js
@@ -12,7 +12,6 @@ jQuery(function($) {
* @param object o W3tc_Lightbox object.
*/
function w3tc_bunnycdn_resize(o) {
- o.options.height = $('.w3tc_cdn_bunnycdn_fsd_form').height();
o.resize();
}
diff --git a/wp-content/plugins/w3-total-cache/Cdnfsd_CloudFront_Page_View.js b/wp-content/plugins/w3-total-cache/Cdnfsd_CloudFront_Page_View.js
index 954ea7c0..147aec04 100644
--- a/wp-content/plugins/w3-total-cache/Cdnfsd_CloudFront_Page_View.js
+++ b/wp-content/plugins/w3-total-cache/Cdnfsd_CloudFront_Page_View.js
@@ -1,6 +1,5 @@
jQuery(function($) {
function w3tc_popup_resize(o) {
- o.options.height = jQuery('.w3tc_popup_form').height() + 30;
o.resize();
}
diff --git a/wp-content/plugins/w3-total-cache/Cdnfsd_Core.php b/wp-content/plugins/w3-total-cache/Cdnfsd_Core.php
index 5063524c..00aefe37 100644
--- a/wp-content/plugins/w3-total-cache/Cdnfsd_Core.php
+++ b/wp-content/plugins/w3-total-cache/Cdnfsd_Core.php
@@ -91,7 +91,7 @@ class Cdnfsd_Core {
array(
'account_api_key' => $c->get_string( 'cdn.bunnycdn.account_api_key' ),
'pull_zone_id' => $c->get_integer( 'cdnfsd.bunnycdn.pull_zone_id' ),
- ),
+ )
);
break;
diff --git a/wp-content/plugins/w3-total-cache/Cdnfsd_LimeLight_Page_View.js b/wp-content/plugins/w3-total-cache/Cdnfsd_LimeLight_Page_View.js
index 4bd60c26..9c89f5c1 100644
--- a/wp-content/plugins/w3-total-cache/Cdnfsd_LimeLight_Page_View.js
+++ b/wp-content/plugins/w3-total-cache/Cdnfsd_LimeLight_Page_View.js
@@ -1,6 +1,5 @@
jQuery(function($) {
function w3tc_popup_resize(o) {
- o.options.height = jQuery('.w3tc_popup_form').height() + 30;
o.resize();
}
diff --git a/wp-content/plugins/w3-total-cache/Cdnfsd_StackPath2_Page_View.js b/wp-content/plugins/w3-total-cache/Cdnfsd_StackPath2_Page_View.js
index 7fd77c27..cbf5c043 100644
--- a/wp-content/plugins/w3-total-cache/Cdnfsd_StackPath2_Page_View.js
+++ b/wp-content/plugins/w3-total-cache/Cdnfsd_StackPath2_Page_View.js
@@ -1,6 +1,5 @@
jQuery(function($) {
function w3tc_stackpath_resize(o) {
- o.options.height = jQuery('.w3tc_cdn_stackpath2_fsd_form').height();
o.resize();
}
diff --git a/wp-content/plugins/w3-total-cache/Cdnfsd_StackPath_Page_View.js b/wp-content/plugins/w3-total-cache/Cdnfsd_StackPath_Page_View.js
index 03651c18..a34dc6ae 100644
--- a/wp-content/plugins/w3-total-cache/Cdnfsd_StackPath_Page_View.js
+++ b/wp-content/plugins/w3-total-cache/Cdnfsd_StackPath_Page_View.js
@@ -1,6 +1,5 @@
jQuery(function($) {
function w3tc_stackpath_fsd_resize(o) {
- o.options.height = jQuery('.w3tc_popup_form').height() + 30;
o.resize();
}
diff --git a/wp-content/plugins/w3-total-cache/ConfigKeys.php b/wp-content/plugins/w3-total-cache/ConfigKeys.php
index 1ab04378..aea781b2 100644
--- a/wp-content/plugins/w3-total-cache/ConfigKeys.php
+++ b/wp-content/plugins/w3-total-cache/ConfigKeys.php
@@ -2532,10 +2532,6 @@ $keys = array(
'type' => 'integer',
'default' => 5
),
- 'widget.pagespeed.enabled' => array(
- 'type' => 'boolean',
- 'default' => false
- ),
'widget.pagespeed.access_token' => array(
'type' => 'string',
'default' => ''
diff --git a/wp-content/plugins/w3-total-cache/Extension_CloudFlare_Page_View.js b/wp-content/plugins/w3-total-cache/Extension_CloudFlare_Page_View.js
index f11a16ad..ff3c3ac0 100644
--- a/wp-content/plugins/w3-total-cache/Extension_CloudFlare_Page_View.js
+++ b/wp-content/plugins/w3-total-cache/Extension_CloudFlare_Page_View.js
@@ -1,6 +1,5 @@
jQuery(function($) {
function w3tc_extension_cloudflare_resize(o) {
- o.options.height = jQuery('.w3tc_extension_cloudflare_form').height() + 30;
o.resize();
}
diff --git a/wp-content/plugins/w3-total-cache/Extension_CloudFlare_Widget.php b/wp-content/plugins/w3-total-cache/Extension_CloudFlare_Widget.php
index bfcac127..e0fa9af5 100644
--- a/wp-content/plugins/w3-total-cache/Extension_CloudFlare_Widget.php
+++ b/wp-content/plugins/w3-total-cache/Extension_CloudFlare_Widget.php
@@ -11,7 +11,7 @@ class Extension_CloudFlare_Widget {
add_action( 'admin_print_scripts-toplevel_page_w3tc_dashboard',
array( $this, 'admin_print_scripts_w3tc_dashboard' ) );
- Util_Widget::add2( 'w3tc_cloudflare', 10000,
+ Util_Widget::add2( 'w3tc_cloudflare', 600,
'
',
array( $this, 'widget_form' ),
Util_Ui::admin_url( 'admin.php?page=w3tc_general#cloudflare' ),
diff --git a/wp-content/plugins/w3-total-cache/Extension_ImageService_Widget.js b/wp-content/plugins/w3-total-cache/Extension_ImageService_Widget.js
new file mode 100644
index 00000000..5487f0c1
--- /dev/null
+++ b/wp-content/plugins/w3-total-cache/Extension_ImageService_Widget.js
@@ -0,0 +1,185 @@
+/**
+ * W3TC image service widgets Google Charts driver.
+ *
+ * @file Google Charts driver for W3TC dashboard image service widget.
+ * @author W3TC.
+ * @version 1.0
+ * @since X.X.X
+ */
+
+jQuery( document ).ready(
+ function() {
+ google.charts.load( 'current', { packages: ['corechart', 'gauge'] } );
+ google.charts.setOnLoadCallback( load );
+
+ setInterval(load, 60000); // Refresh charts every 60 seconds
+
+ jQuery(window).resize(load); // Redraw charts after resize
+
+ // Load method for image service charts. Fires on document ready, window resize, and on 60 second interval.
+ function load() {
+ processed_data = preprocess_data( w3tc_webp_data );
+ draw_charts( processed_data );
+ }
+
+ // Preprocesses statistics data for chart use.
+ /**
+ * @param {array} data Image Service data.
+ * @returns {array} Image Service data in format required for Google charts.
+ */
+ function preprocess_data( data ) {
+ var processed_data = {
+ 'counts': {
+ 'data': [
+ [ 'Converted', Number(data.counts.data['converted']),data.counts.data['convertedbytes'] ],
+ [ 'Not Converted', Number(data.counts.data['notconverted']),data.counts.data['notconvertedbytes'] ],
+ [ 'Processing', Number(data.counts.data['processing']),data.counts.data['processingbytes'] ],
+ [ 'Sending', Number(data.counts.data['sending']),data.counts.data['sendingbytes'] ],
+ [ 'Unconverted', Number(data.counts.data['unconverted']),data.counts.data['unconvertedbytes'] ]
+ ],
+ 'type': data.counts.type
+ },
+ 'apihourly': {
+ 'data': [
+ [ 'Hourly', Number( data.api.data['usage_hourly'] ) ]
+ ],
+ 'limit': Number( data.api.data['limit_hourly'] ),
+ 'type': data.api.type
+ }
+ };
+
+ // Monthly data is only present for free users as pro is unlimited monthly usage.
+ if( 'limit_monthly' in data.api.data ) {
+ processed_data['apimonthly'] = {
+ 'data': [
+ [ 'Monthly', Number( data.api.data['usage_monthly'] ) ]
+ ],
+ 'limit': Number( data.api.data['limit_monthly'] ),
+ 'type': data.api.type
+ };
+ }
+
+ return processed_data;
+ }
+
+ // Draws the stats charts.
+ /**
+ * @param {array} data - Preprocessed Image Service data.
+ */
+ function draw_charts( data ) {
+ for ( var key in data ) {
+ if ( data[key]['type'] === 'pie' && document.getElementById( key + '_chart' ) ) {
+ var chart_data = new google.visualization.DataTable();
+
+ // Add columns for the chart data
+ chart_data.addColumn( 'string', 'Status' );
+ chart_data.addColumn( 'number', 'Count' );
+ chart_data.addColumn( { type: 'string', role: 'tooltip', 'p': { 'html': true } } );
+ chart_data.addColumn( 'number', 'Bytes' );
+
+ // Add rows for the chart data
+ data[key]['data'].forEach( function ( row ) {
+ chart_data.addRow( [ row[0], row[1], generateTooltip( row[0], row[1], row[2]), row[2] ] );
+ });
+
+ var chart_options = {
+ chartArea: { width: '100%', height: '100%', top: 8, bottom: 40 },
+ legend: { position: 'bottom' },
+ tooltip: { isHtml: true }
+ };
+
+ var chart = new google.visualization.PieChart( document.getElementById( key + '_chart' ) );
+ } else if( data[key]['type'] === 'gauge' ) {
+ if( document.getElementById( key + '_chart' ) === null ) {
+ jQuery( '#api_charts' ).append( '
' );
+ }
+
+ var chart_data = google.visualization.arrayToDataTable( data[key]['data'], true );
+ var yellow_from, yellow_to, red_from;
+
+ if ( data[key]['limit'] > 100 && data[key]['limit'] <= 1000 ) {
+ yellow_from = data[key]['limit'] - 200;
+ yellow_to = data[key]['limit'] - 100;
+ red_from = data[key]['limit'] - 100;
+ } else if ( data[key]['limit'] > 1000 ) {
+ yellow_from = data[key]['limit'] - 2000;
+ yellow_to = data[key]['limit'] - 1000;
+ red_from = data[key]['limit'] - 1000;
+ } else {
+ yellow_from = data[key]['limit'] - 20;
+ yellow_to = data[key]['limit'] - 10;
+ red_from = data[key]['limit'] - 10;
+ }
+
+ var chart_options = {
+ legend: { position: 'bottom' },
+ max: data[key]['limit'],
+ yellowFrom: yellow_from,
+ yellowTo: yellow_to,
+ redFrom: red_from,
+ redTo: data[key]['limit'],
+ minorTicks: 5
+ };
+
+ var chart = new google.visualization.Gauge( document.getElementById( key + '_chart' ) );
+ }
+ chart.draw( chart_data, chart_options );
+ };
+ }
+
+ // Function to generate custom tooltip with count and bytes
+ function generateTooltip( dataType, count, bytes ) {
+ return `Type: ${dataType}Count: ${count}Bytes: ${formatBytes(bytes)}
`;
+ }
+
+ // Formats a timestamp into a human readable string.
+ /**
+ * @param {Object} d Timestamp.
+ * @returns {string} Human readable date/time string.
+ */
+ function dateFormat( d ){
+ return ( "0" + d.getUTCHours() ).slice( -2 ) + ":" + ( "0" + d.getUTCMinutes() ).slice( -2 );
+ }
+
+ // Formats bytes into a human readable string.
+ /**
+ * @param {Number} x Bytes.
+ * @returns {string} Human readable string.
+ */
+ function formatBytes( x ){
+ const units = [ 'bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB' ];
+ let l = 0, n = parseInt(x, 10) || 0;
+
+ while( n >= 1000 && ++l ){
+ n = n/1000;
+ }
+
+ return( n.toFixed( n < 10 && l > 0 ? 1 : 0 ) + ' ' + units[l] );
+ }
+
+ // Time since last refresh.
+ var seconds_timer_id;
+
+ // Interval for the image service data refresh.
+ /**
+ * @param {Number} new_seconds_till_refresh Interval to trigger refresh.
+ */
+ function setRefresh( new_seconds_till_refresh ) {
+ clearTimeout( seconds_timer_id );
+ var seconds_till_refresh = new_seconds_till_refresh;
+ seconds_timer_id = setInterval(
+ function () {
+ seconds_till_refresh--;
+ if ( seconds_till_refresh <= 0 ) {
+ clearInterval( seconds_timer_id ); // Change clearTimeout to clearInterval here
+ seconds_timer_id = null;
+ load();
+ setRefresh( new_seconds_till_refresh ); // Restart the timer after calling load()
+ return;
+ }
+ },
+ 1000
+ );
+ }
+ }
+);
diff --git a/wp-content/plugins/w3-total-cache/Extension_ImageService_Widget.php b/wp-content/plugins/w3-total-cache/Extension_ImageService_Widget.php
new file mode 100644
index 00000000..fa57061b
--- /dev/null
+++ b/wp-content/plugins/w3-total-cache/Extension_ImageService_Widget.php
@@ -0,0 +1,118 @@
+is_extension_active( 'imageservice' ) ) {
+ // If extension is inactive don't load data or chart.js. This will show instead show an "enable" button with sample background.
+ return;
+ }
+
+ wp_enqueue_script( 'w3tc-dashboard', plugins_url( 'pub/js/google-charts.js', W3TC_FILE ), array(), W3TC_VERSION, true );
+
+ $ipa = new Extension_ImageService_Plugin_Admin();
+ // Get WebP count data.
+ $counts = $ipa->get_counts();
+ // Strip total data that won't be used in pie chart.
+ $counts = array_diff_key( $counts, array_flip( array( 'total', 'totalbytes' ) ) );
+
+ // Get WebP API Usage data.
+ $usage = get_transient( 'w3tc_imageservice_usage' );
+ // Get data via API if no transient exists.
+ $usage = empty( $usage ) ? Extension_ImageService_Plugin::get_api()->get_usage() : $usage;
+ // Strip timestamp.
+ unset( $usage['updated_at'] );
+
+ // Validate hourly data. If no data then set usage to 0 and appropriate limits.
+ $usage['usage_hourly'] = 'Unknown' !== $usage['usage_hourly'] ? $usage['usage_hourly'] : 0;
+ $usage['limit_hourly'] = 'Unknown' !== $usage['limit_hourly'] ? $usage['limit_hourly'] : ( $is_pro ? 10000 : 100 );
+
+ // Validate monthly data. If no data then set usage to 0 and appropriate limits.
+ // Remove if pro as we don't show a gauge for pro usage.
+ if ( $is_pro ) {
+ unset( $usage['usage_monthly'] );
+ unset( $usage['limit_monthly'] );
+ } else {
+ $usage['usage_monthly'] = 'Unknown' !== $usage['usage_monthly'] ? $usage['usage_monthly'] : 0;
+ $usage['limit_monthly'] = 'Unknown' !== $usage['limit_monthly'] ? $usage['limit_monthly'] : 1000;
+ }
+
+ wp_register_script(
+ 'w3tc-webp-widget',
+ esc_url( plugins_url( 'Extension_ImageService_Widget.js', W3TC_FILE ) ),
+ array(),
+ W3TC_VERSION,
+ 'true'
+ );
+ wp_localize_script(
+ 'w3tc-webp-widget',
+ 'w3tc_webp_data',
+ array(
+ 'counts' => array(
+ 'data' => $counts,
+ 'type' => 'pie',
+ ),
+ 'api' => array(
+ 'data' => $usage,
+ 'type' => 'gauge',
+ ),
+ )
+ );
+ wp_enqueue_script( 'w3tc-webp-widget' );
+ }
+
+ /**
+ * W3TC dashboard Premium Services widget.
+ *
+ * @since X.X.X
+ *
+ * @return void
+ */
+ public function wp_dashboard_setup() {
+ Util_Widget::add(
+ 'w3tc_imageservice',
+ '
' . __( 'Image Optimization Summary', 'w3-total-cache' ) . '
',
+ array( $this, 'widget_form' ),
+ null,
+ 'normal'
+ );
+ }
+
+ /**
+ * Premium Services widget content.
+ *
+ * @since X.X.X
+ *
+ * @return void
+ */
+ public function widget_form() {
+ include W3TC_DIR . '/Extension_ImageService_Widget_View.php';
+ }
+}
diff --git a/wp-content/plugins/w3-total-cache/Extension_ImageService_Widget_View.php b/wp-content/plugins/w3-total-cache/Extension_ImageService_Widget_View.php
new file mode 100644
index 00000000..c3ad2d80
--- /dev/null
+++ b/wp-content/plugins/w3-total-cache/Extension_ImageService_Widget_View.php
@@ -0,0 +1,52 @@
+is_extension_active( 'imageservice' ) ) {
+ ?>
+
+
+
+ array(
+ 'type' => array(),
+ 'name' => array(),
+ 'class' => array(),
+ 'value' => array(),
+ 'onclick' => array(),
+ 'data-src' => array(),
+ ),
+ )
+ );
+ ?>
+
+ _config = Dispatcher::config();
- add_action( 'w3tc_widget_setup', array( $o, 'wp_dashboard_setup' ), 9000 );
- add_action( 'w3tc_network_dashboard_setup',
- array( $o, 'wp_dashboard_setup' ), 9000 );
+ add_action( 'w3tc_widget_setup', array( $o, 'wp_dashboard_setup' ), 1000 );
+ add_action( 'w3tc_network_dashboard_setup', array( $o, 'wp_dashboard_setup' ), 1000 );
$nerser = Dispatcher::component( 'Extension_NewRelic_Service' );
$view_application = $nerser->get_effective_application_id();
diff --git a/wp-content/plugins/w3-total-cache/Extension_Swarmify_Plugin_Admin.php b/wp-content/plugins/w3-total-cache/Extension_Swarmify_Plugin_Admin.php
index 226c8bc3..0c9aa231 100644
--- a/wp-content/plugins/w3-total-cache/Extension_Swarmify_Plugin_Admin.php
+++ b/wp-content/plugins/w3-total-cache/Extension_Swarmify_Plugin_Admin.php
@@ -33,10 +33,6 @@ class Extension_Swarmify_Plugin_Admin {
function run() {
add_action( 'w3tc_config_save', array( $this, 'w3tc_config_save' ), 10, 1 );
- add_action( 'admin_init_w3tc_dashboard', array(
- '\W3TC\Extension_Swarmify_Widget',
- 'admin_init_w3tc_dashboard' ) );
-
add_action( 'w3tc_extension_page_swarmify',
array( $this, 'w3tc_extension_page_swarmify' ) );
diff --git a/wp-content/plugins/w3-total-cache/Extension_Swarmify_Widget.php b/wp-content/plugins/w3-total-cache/Extension_Swarmify_Widget.php
deleted file mode 100644
index c79af398..00000000
--- a/wp-content/plugins/w3-total-cache/Extension_Swarmify_Widget.php
+++ /dev/null
@@ -1,237 +0,0 @@
-_config = Dispatcher::config();
-
- add_action( 'w3tc_widget_setup',
- array( $o, 'wp_dashboard_setup' ), 9000 );
- add_action( 'w3tc_network_dashboard_setup',
- array( $o, 'wp_dashboard_setup' ), 9500 );
-
- wp_enqueue_style( 'w3tc-widget-swarmify',
- plugins_url( 'Extension_Swarmify_Widget_View.css', W3TC_FILE ),
- array(), W3TC_VERSION );
- }
-
- /**
- * Dashboard setup action
- */
- function wp_dashboard_setup() {
- Util_Widget::add( 'w3tc_swarmify',
- '
',
- array( $this, 'widget_swarmify' ),
- Util_Ui::admin_url( 'admin.php?page=w3tc_extensions&extension=swarmify&action=view' ),
- 'normal' );
- }
-
-
-
- /**
- * Loads and configured New Relic widget to be used in WP Dashboards.
- *
- * @param unknown $widget_id
- * @param array $form_inputs
- */
- function widget_swarmify( $widget_id, $form_inputs = array() ) {
- $api_key = $this->_config->get_string( array( 'swarmify', 'api_key' ) );
- $configured = !empty( $api_key );
-
- $swarmify_signup_url = 'https://www.swarmify.com/landing/w3tc?return=' .
- urlencode( wp_nonce_url( Util_Ui::admin_url( 'admin.php' ), 'w3tc' ) .
- '&page=w3tc_extensions&w3tc_swarmify_set_key=set' );
-
- if ( $configured ) {
- include W3TC_DIR . '/Extension_Swarmify_Widget_View_NotConfigured.php';
- return;
- } else {
- include W3TC_DIR . '/Extension_Swarmify_Widget_View_NotConfigured.php';
- }
- }
-
-
-
- /**
- * Gives data for widget content
- */
- public function w3tc_ajax_newrelic_widgetdata_basic() {
- // cache status for some small time
- $response = get_transient( 'w3tc_nr_widgetdata_basic' );
- $response = @json_decode( $response, true );
- if ( is_array( $response ) && isset( $response['time'] ) &&
- $response['time'] >= time() - 60 ) {
- echo json_encode( $response );
- return;
- }
-
- $service = Dispatcher::component( 'Extension_NewRelic_Service' );
- $verify_running = $service->verify_running();
-
- $response = array(
- 'time' => time()
- );
-
- if ( !is_array( $verify_running ) )
- $response['php_agent'] = 'enabled ';
- else
- $response['php_agent'] = 'disabled ';
-
- try {
- $subscription = $service->get_subscription();
- $response['subscription_level'] = $subscription['product-name'];
-
- $summary = $service->get_application_summary();
- $this->_fill( $response, 'apdex', $summary, 'Apdex' );
- $this->_fill( $response, 'application_busy', $summary,
- 'Application Busy' );
- $this->_fill( $response, 'error_rate', $summary, 'Error Rate' );
- $this->_fill( $response, 'throughput', $summary, 'Throughput' );
- $this->_fill( $response, 'errors', $summary, 'Errors' );
- $this->_fill( $response, 'response_time', $summary, 'Response Time' );
- $this->_fill( $response, 'db', $summary, 'DB' );
- $this->_fill( $response, 'cpu', $summary, 'CPU' );
- $this->_fill( $response, 'memory', $summary, 'Memory' );
-
- $can_use_metrics = $service->can_get_metrics();
- if ( $can_use_metrics ) {
- $dashboard_metrics = $service->get_dashboard_metrics();
- $this->_fill_avg( $response, 'enduser', $dashboard_metrics,
- 'EndUser' );
- $this->_fill_avg( $response, 'webtransaction', $dashboard_metrics,
- 'WebTransaction' );
- $this->_fill_avg( $response, 'database', $dashboard_metrics,
- 'Database' );
- }
-
- // load data for notification here too
- $pl = $service->get_frontend_response_time();
- update_option( 'w3tc_nr_frontend_response_time', $pl );
- } catch ( \Exception $ex ) {
- }
-
- set_transient( 'w3tc_nr_widgetdata_basic', json_encode( $response ), 60 );
- echo json_encode( $response );
- }
-
-
-
- public function w3tc_ajax_newrelic_widgetdata_pageloads() {
- $response = array(
- 'content' => 'No data available
'
- );
-
- try {
- $service = Dispatcher::component( 'Extension_NewRelic_Service' );
- $can_use_metrics = $service->can_get_metrics();
- if ( $can_use_metrics ) {
- $metric_slow_pages = $service->get_slowest_page_load();
- if ( count( $metric_slow_pages ) > 0 ) {
- $s = '';
-
- foreach ( $metric_slow_pages as $transaction => $time ) {
- $s .= '' . $transaction .
- ' ' . Util_Ui::secs_to_time( $time ) .
- ' ';
- }
-
- $s .= '
';
- $response['content'] = $s;
- }
- }
- } catch ( \Exception $e ) {
- $response['content'] = 'Error occurred
';
- }
-
- echo json_encode( $response );
- }
-
-
-
- public function w3tc_ajax_newrelic_widgetdata_webtransactions() {
- $response = array(
- 'content' => 'No data available
'
- );
-
- try {
- $service = Dispatcher::component( 'Extension_NewRelic_Service' );
- $can_use_metrics = $service->can_get_metrics();
- if ( $can_use_metrics ) {
- $metric_slow = $service->get_slowest_webtransactions();
- if ( count( $metric_slow ) > 0 ) {
- $s = '';
-
- foreach ( $metric_slow as $transaction => $time ) {
- $s .= '' . $transaction .
- ' ' . Util_Ui::secs_to_time( $time ) .
- ' ';
- }
-
- $s .= '
';
- $response['content'] = $s;
- }
- }
- } catch ( \Exception $e ) {
- $response['content'] = 'Error occurred
';
- }
-
- echo json_encode( $response );
- }
-
-
-
-
- public function w3tc_ajax_newrelic_widgetdata_dbtimes() {
- $response = array(
- 'content' => 'No data available
'
- );
-
- try {
- $service = Dispatcher::component( 'Extension_NewRelic_Service' );
- $can_use_metrics = $service->can_get_metrics();
- if ( $can_use_metrics ) {
- $metric_slow = $service->get_slowest_database();
- if ( count( $metric_slow ) > 0 ) {
- $s = '';
-
- foreach ( $metric_slow as $transaction => $time ) {
- $s .= '' . $transaction .
- ' ' . Util_Ui::secs_to_time( $time ) .
- ' ';
- }
-
- $s .= '
';
- $response['content'] = $s;
- }
- }
- } catch ( \Exception $e ) {
- $response['content'] = 'Error occurred
';
- }
-
- echo json_encode( $response );
- }
-
-
-
- private function _fill( &$response, $response_key, $summary, $summary_key ) {
- if ( isset( $summary[$summary_key] ) )
- $response[$response_key] = $summary[$summary_key];
- }
-
-
-
- private function _fill_avg( &$response, $response_key, $metrics, $metric_key ) {
- if ( !isset( $metrics[$metric_key] ) )
- return;
-
- $data = $metrics[$metric_key];
- $response[$response_key] = Util_Ui::secs_to_time(
- array_shift( $data[0] )->average_response_time
- );
- }
-}
diff --git a/wp-content/plugins/w3-total-cache/Extension_Swarmify_Widget_View.css b/wp-content/plugins/w3-total-cache/Extension_Swarmify_Widget_View.css
deleted file mode 100644
index f9c4d6f1..00000000
--- a/wp-content/plugins/w3-total-cache/Extension_Swarmify_Widget_View.css
+++ /dev/null
@@ -1,33 +0,0 @@
-.w3tc-widget-swarmify-base.sign-up h4 {
- text-align: left;
- margin-bottom: 0;
- padding-bottom: 0;
-}
-.w3tc-widget-swarmify-base.sign-up p {
- margin-top: 4px;
- padding-top: 0;
-}
-.w3tc-widget-swarmify-base.sign-up p span.desc {
- color:#8F8F8F;
-}
-
-.w3tc-widget-swarmify-logo {
- width: 170px;
- height: 35px;
- background: url("pub/img/w3tc_swarmify-logo.png") 0 5px no-repeat;
- float: left;
-}
-
-/*
-@media
-(-webkit-min-device-pixel-ratio: 2),
-(min-resolution: 192dpi) {
- .w3tc-widget-swarmify-logo{
- float: left;
- width: 180px;
- height: 90px;
- background-image: url("pub/img/w3tc_swarmify-logo-retina.png");
- background-size: 589px 90px;
- }
-}
-*/
diff --git a/wp-content/plugins/w3-total-cache/Extension_Swarmify_Widget_View_NotConfigured.php b/wp-content/plugins/w3-total-cache/Extension_Swarmify_Widget_View_NotConfigured.php
deleted file mode 100644
index d50ef0c5..00000000
--- a/wp-content/plugins/w3-total-cache/Extension_Swarmify_Widget_View_NotConfigured.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
diff --git a/wp-content/plugins/w3-total-cache/Extensions_Page.php b/wp-content/plugins/w3-total-cache/Extensions_Page.php
index 29f3076e..752dafb8 100644
--- a/wp-content/plugins/w3-total-cache/Extensions_Page.php
+++ b/wp-content/plugins/w3-total-cache/Extensions_Page.php
@@ -38,34 +38,47 @@ class Extensions_Page extends Base_Page_Settings {
}
}
- $extension = '';
$extension_val = Util_Request::get_string( 'extension' );
- if ( ! empty( $extension_val ) ) {
- $extension = esc_attr( $extension_val );
- }
+ $extension = ( ! empty( $extension_val ) ? esc_attr( $extension_val ) : '' );
$action_val = Util_Request::get_string( 'action' );
$view = ( ! empty( $action_val ) && 'view' === $action_val );
$extensions_active = Extensions_Util::get_active_extensions( $this->_config );
+ foreach ( $extensions_active as $key => $ext ) {
+ if ( isset( $ext['public'] ) && false === $ext['public'] ) {
+ unset( $extensions_active[ $key ] );
+ }
+ }
if ( $extension && $view ) {
$all_settings = $this->_config->get_array( 'extensions.settings' );
- $meta = $extensions_active[$extension];
- $sub_view = 'settings';
+ $meta = $extensions_active[ $extension ];
+ $sub_view = 'settings';
} else {
$extensions_all = Extensions_Util::get_extensions( $this->_config );
+ foreach ( $extensions_all as $key => $ext ) {
+ if ( isset( $ext['public'] ) && false === $ext['public'] ) {
+ unset( $extensions_all[ $key ] );
+ }
+ }
+
$extensions_inactive = Extensions_Util::get_inactive_extensions( $this->_config );
- $var = "extensions_{$extension_status}";
- $extensions = $$var;
- $extension_keys = array_keys($extensions);
- sort($extension_keys);
+ foreach ( $extensions_inactive as $key => $ext ) {
+ if ( isset( $ext['public'] ) && false === $ext['public'] ) {
+ unset( $extensions_inactive[ $key ] );
+ }
+ }
+
+ $var = "extensions_{$extension_status}";
+ $extensions = $$var;
+ $extension_keys = array_keys( $extensions );
+ sort( $extension_keys );
$sub_view = 'list';
- $page = 1;
+ $page = 1;
}
- $config = Dispatcher::config();
include W3TC_INC_OPTIONS_DIR . '/extensions.php';
}
diff --git a/wp-content/plugins/w3-total-cache/FeatureShowcase_Plugin_Admin.php b/wp-content/plugins/w3-total-cache/FeatureShowcase_Plugin_Admin.php
index 9b4b3579..5176d5f2 100644
--- a/wp-content/plugins/w3-total-cache/FeatureShowcase_Plugin_Admin.php
+++ b/wp-content/plugins/w3-total-cache/FeatureShowcase_Plugin_Admin.php
@@ -240,6 +240,22 @@ class FeatureShowcase_Plugin_Admin {
return array(
'new' => array(
+ 'remove-cssjs' => array(
+ 'title' => esc_html__( 'Remove Unused CSS/JS', 'w3-total-cache' ),
+ 'icon' => 'dashicons-editor-strikethrough',
+ 'text' => esc_html__( 'Removes specfied CSS/JS tags from the homepage or on a per page basis. Can be used to eliminate unused CSS/JS on pages that do not require them.', 'w3-total-cache' ),
+ 'button' => '' .
+ __( 'Settings', 'w3-total-cache' ) . ' ',
+ 'link' => '' . __( 'More info', 'w3-total-cache' ) . ' ',
+ 'is_premium' => true,
+ 'is_new' => true,
+ 'version' => '2.7.0',
+ ),
'preload-requests' => array(
'title' => esc_html__( 'Preload Requests', 'w3-total-cache' ),
'icon' => 'dashicons-controls-repeat',
@@ -254,6 +270,7 @@ class FeatureShowcase_Plugin_Admin {
'">' . __( 'More info', 'w3-total-cache' ) . ' ',
'is_premium' => true,
'is_new' => true,
+ 'version' => '2.6.1',
),
'defer-scripts' => array(
'title' => esc_html__( 'Delay Scripts', 'w3-total-cache' ),
@@ -269,6 +286,7 @@ class FeatureShowcase_Plugin_Admin {
'">' . __( 'More info', 'w3-total-cache' ) . ' ',
'is_premium' => true,
'is_new' => true,
+ 'version' => '2.6.1',
),
),
'old' => array(
diff --git a/wp-content/plugins/w3-total-cache/FeatureShowcase_Plugin_Admin_View.php b/wp-content/plugins/w3-total-cache/FeatureShowcase_Plugin_Admin_View.php
index 6d66ded7..6b2f3b29 100644
--- a/wp-content/plugins/w3-total-cache/FeatureShowcase_Plugin_Admin_View.php
+++ b/wp-content/plugins/w3-total-cache/FeatureShowcase_Plugin_Admin_View.php
@@ -44,7 +44,6 @@ foreach ( $cards_data as $card_type => $cards ) {
$card_classes = 'w3tc-card';
$title_classes = 'w3tc-card-title';
$is_premium = ! empty( $card['is_premium'] );
- $is_new = ! empty( $card['is_new'] );
if ( $is_premium ) {
$card_classes .= ' w3tc-card-premium';
@@ -80,13 +79,13 @@ foreach ( $cards_data as $card_type => $cards ) {
- W3 Total Cache Pro !
+ W3 Total Cache !
div > div,
+#api_charts #apimonthly_chart table tr td > div > div {
+ width: 100%;
+ margin: 0 auto;
+}
+
+svg > g:last-child > g:last-child { pointer-events: none }
+div.google-visualization-tooltip { pointer-events: none }
+
+#w3tc_imageservice .w3tc-webp-widget-stats-inactive {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background-size: contain;
+ background-repeat: no-repeat;
+ background-position: center;
+ width: 100%;
+ height: 100%;
+}
+
+#w3tc_imageservice .w3tc-webp-widget-stats-inactive {
+ background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), url("pub/img/w3tc-webp-converter.png");
+}
+
+#w3tc_partners #partner-list li {
+ display: flex;
+ align-items: center;
+ margin-bottom: 5px;
+}
+
+#w3tc_partners #partner-list li .partner-logo {
+ margin-right: 10px;
+ display: flex;
+ align-items: center;
+}
+
+#w3tc_partners #partner-list li .partner-logo img {
+ display: block;
+ height: auto;
+}
+
+#w3tc_partners #partner-bottom {
+ text-align: right;
+}
+
+@media only screen and (max-width: 1200px) {
+ .general-settings-container {
+ column-gap: 35px;
+ }
+
+ .general-settings-container .general-setting {
+ width: calc(50% - 18px);
+ }
+}
+
+@media only screen and (max-width: 980px) {
+ .general-settings-container .general-setting {
+ width: 100%;
+ }
+}
+
+@media only screen and (max-width: 782px) {
+ .general-settings-container {
+ column-gap: 35px;
+ }
+
+ .general-settings-container .general-setting {
+ width: calc(50% - 18px);
+ }
}
@media only screen and (max-device-width: 480px) {
- #w3tc-dashboard-widgets #postbox-container-left {
- margin-right: 0px;
- }
- #w3tc-dashboard-widgets {
- min-width: auto;
- flex-wrap: wrap;
- }
- #postbox-container-right {
- width: 100%;
- white-space: nowrap;
- float: left;
- margin-left: 0px;
- }
- #w3tc-dashboard-widgets {
- background: none;
- }
- #w3tc-dashboard-widgets #normal-sortables .postbox {
- width: 100%;
- }
- #w3tc-dashboard-widgets #side-sortables .postbox .postbox-header .w3tc-widget-text {
- float: none;
- }
- #w3tc-dashboard-widgets #side-sortables .postbox .postbox-header,
- #w3tc-dashboard-widgets #side-sortables .postbox .inside {
- text-align: center;
- }
.w3tc_generic_widgetservice_label {
display: inline;
}
+
+ .general-settings-container .general-setting {
+ width: 100%;
+ }
+ #api_charts #apihourly_chart,
+ #api_charts #apimonthly_chart {
+ width: 100%;
+ }
}
-
-/**
- * HiDPI Displays
- */
-/* doesnt work
-@media print,
-only screen and (-webkit-min-device-pixel-ratio: 2),
-only screen and ( min--moz-device-pixel-ratio: 2),
-only screen and ( -o-min-device-pixel-ratio: 2/1),
-only screen and ( min-device-pixel-ratio: 2),
-only screen and ( min-resolution: 192dpi),
-only screen and ( min-resolution: 2dppx) {
- #w3tc h2.logo {
- background-image: url("pub/img/W3TC_dashboard_logo_title-retina.png");
- background-size: 224px 44px;
- }
-
- .w3tc-widget-w3tc-logo {
- float: left;
- width: 50px;
- height: 90px;
- background-image: url("pub/img/w3tc_w3tc-logo-retina.png");
- background-size: 41px 34px;
- }
-
- .w3tc-widget-services-logo {
- float: left;
- width: 50px;
- height: 90px;
- background-image: url("pub/img/w3tc_w3edge-logo-retina.png");
- background-size: 37px 35px;
- }
-
- .w3tc-widget-pagespeed-logo {
- float: left;
- width: 110px;
- height: 90px;
- background-image: url("pub/img/w3tc_google-logo-retina.png");
- background-size: 97px 33px;
- }
-}
-*/
diff --git a/wp-content/plugins/w3-total-cache/Generic_Page_Install.php b/wp-content/plugins/w3-total-cache/Generic_Page_Install.php
index 372893b5..f20058bc 100644
--- a/wp-content/plugins/w3-total-cache/Generic_Page_Install.php
+++ b/wp-content/plugins/w3-total-cache/Generic_Page_Install.php
@@ -18,6 +18,7 @@ class Generic_Page_Install extends Base_Page_Settings {
*/
function view() {
$rewrite_rules_descriptors = array();
+ $other_areas = array();
if ( Util_Rule::can_check_rules() ) {
$e = Dispatcher::component( 'Root_Environment' );
diff --git a/wp-content/plugins/w3-total-cache/Generic_Plugin.php b/wp-content/plugins/w3-total-cache/Generic_Plugin.php
index ca1b54e6..c5b1cfe2 100644
--- a/wp-content/plugins/w3-total-cache/Generic_Plugin.php
+++ b/wp-content/plugins/w3-total-cache/Generic_Plugin.php
@@ -545,6 +545,7 @@ class Generic_Plugin {
array(
'swarmify',
'lazyload',
+ 'removecssjs',
'deferscripts',
'minify',
'newrelic',
diff --git a/wp-content/plugins/w3-total-cache/Generic_Plugin_Admin.php b/wp-content/plugins/w3-total-cache/Generic_Plugin_Admin.php
index 1a03d4ab..a2ab7656 100644
--- a/wp-content/plugins/w3-total-cache/Generic_Plugin_Admin.php
+++ b/wp-content/plugins/w3-total-cache/Generic_Plugin_Admin.php
@@ -56,9 +56,13 @@ class Generic_Plugin_Admin {
$this->is_w3tc_page = Util_Admin::is_w3tc_admin_page();
add_action( 'admin_init', array( $this, 'admin_init' ) );
+ add_action( 'admin_init_w3tc_dashboard', array( '\W3TC\Generic_WidgetAccount', 'admin_init_w3tc_dashboard' ) );
+ add_action( 'admin_init_w3tc_dashboard', array( '\W3TC\Generic_WidgetSettings', 'admin_init_w3tc_dashboard' ) );
+ add_action( 'admin_init_w3tc_dashboard', array( '\W3TC\Generic_WidgetPartners', 'admin_init_w3tc_dashboard' ) );
add_action( 'admin_init_w3tc_dashboard', array( '\W3TC\Generic_WidgetServices', 'admin_init_w3tc_dashboard' ) );
- add_action( 'admin_init_w3tc_dashboard', array( '\W3TC\Generic_WidgetCommunity', 'admin_init_w3tc_dashboard' ) );
add_action( 'admin_init_w3tc_dashboard', array( '\W3TC\Generic_WidgetBoldGrid', 'admin_init_w3tc_dashboard' ) );
+ add_action( 'admin_init_w3tc_dashboard', array( '\W3TC\Generic_WidgetStats', 'admin_init_w3tc_dashboard' ) );
+ add_action( 'admin_init_w3tc_dashboard', array( '\W3TC\Extension_ImageService_Widget', 'admin_init_w3tc_dashboard' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
add_action( 'admin_print_styles-toplevel_page_w3tc_dashboard', array( '\W3TC\Generic_Page_Dashboard', 'admin_print_styles_w3tc_dashboard' ) );
@@ -384,18 +388,6 @@ class Generic_Plugin_Admin {
}
}
- if ( 'w3tc_dashboard' === $page ) {
- ?>
-
- _config->get_boolean( 'common.track_usage' ) && $this->is_w3tc_page ) {
$current_user = wp_get_current_user();
@@ -632,6 +624,19 @@ class Generic_Plugin_Admin {
true
);
// No break.
+ case 'w3tc_userexperience':
+ if ( UserExperience_Remove_CssJs_Extension::is_enabled() ) {
+ wp_enqueue_script(
+ 'w3tc_remove_cssjs',
+ plugins_url( 'UserExperience_Remove_CssJs_Page_View.js', W3TC_FILE ),
+ array(
+ 'jquery',
+ ),
+ W3TC_VERSION,
+ true
+ );
+ }
+ // No break.
case 'w3tc_cdn':
wp_enqueue_script( 'jquery-ui-sortable' );
break;
diff --git a/wp-content/plugins/w3-total-cache/Generic_Plugin_WidgetForum.php b/wp-content/plugins/w3-total-cache/Generic_Plugin_WidgetForum.php
deleted file mode 100644
index 271d0a80..00000000
--- a/wp-content/plugins/w3-total-cache/Generic_Plugin_WidgetForum.php
+++ /dev/null
@@ -1,151 +0,0 @@
-_config = Dispatcher::config();
- }
-
- /**
- * Runs plugin.
- */
- public function run() {
- if ( Util_Admin::get_current_wp_page() == 'w3tc_dashboard' ) {
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
- }
-
- add_action(
- 'w3tc_widget_setup',
- array( $this, 'wp_dashboard_setup' )
- );
-
- add_action(
- 'w3tc_network_dashboard_setup',
- array( $this, 'wp_dashboard_setup' )
- );
-
- if ( is_admin() ) {
- add_action( 'wp_ajax_w3tc_widget_latest_ajax', array( $this, 'action_widget_latest_ajax' ) );
- }
- }
-
- /**
- * Dashboard setup action.
- */
- public function wp_dashboard_setup() {
- Util_Widget::add(
- 'w3tc_latest',
- __( 'Discussions', 'w3-total-cache' ),
- array( $this, 'widget_latest' ),
- array( $this, 'widget_latest_control' ),
- 'side'
- );
- }
-
- /**
- * Returns key for transient cache of "widget latest".
- */
- public function _widget_latest_cache_key() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
- return 'dash_' . md5( 'w3tc_latest' );
- }
-
- /**
- * Prints latest widget contents.
- */
- public function widget_latest() {
- $output = get_transient( $this->_widget_latest_cache_key() );
-
- if ( false !== $output ) {
- echo wp_kses(
- $output,
- array(
- 'a' => array(
- 'href' => array(),
- 'target' => array(),
- ),
- 'h4' => array(),
- 'p' => array(
- 'style' => array(),
- ),
- )
- );
- } else {
- include W3TC_INC_DIR . '/widget/latest.php';
- }
- }
-
- /**
- * Prints latest widget contents.
- */
- public function action_widget_latest_ajax() {
- // Load content of feed.
- global $wp_version;
-
- $items = array();
- $items_count = $this->_config->get_integer( 'widget.latest.items' );
-
- include_once ABSPATH . WPINC . '/feed.php';
- $feed = fetch_feed( W3TC_FEED_URL );
-
- if ( ! is_wp_error( $feed ) ) {
- $feed_items = $feed->get_items( 0, $items_count );
-
- foreach ( $feed_items as $feed_item ) {
- $items[] = array(
- 'link' => $feed_item->get_link(),
- 'title' => htmlspecialchars_decode( $feed_item->get_title() ),
- );
- }
- }
-
- ob_start();
- include W3TC_INC_DIR . '/widget/latest_ajax.php';
-
- // Default lifetime in cache of 12 hours (same as the feeds).
- set_transient( $this->_widget_latest_cache_key(), ob_get_flush(), 43200 );
- die();
- }
-
- /**
- * Latest widget control
- *
- * @param integer $widget_id Widget id.
- * @param array $form_inputs Form inputs.
- */
- public function widget_latest_control( $widget_id, $form_inputs = array() ) {
- if ( 'POST' === ( isset( $_SERVER['REQUEST_METHOD'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_METHOD'] ) ) : '' ) ) {
- $this->_config->set( 'widget.latest.items', Util_Request::get_integer( 'w3tc_widget_latest_items', 3 ) );
- $this->_config->save();
- delete_transient( $this->_widget_latest_cache_key() );
- }
- include W3TC_INC_DIR . '/widget/latest_control.php';
- }
-
- /**
- * Enqueue scripts and styles.
- */
- public function enqueue() {
- wp_enqueue_style( 'w3tc-widget' );
- wp_enqueue_script( 'w3tc-metadata' );
- wp_enqueue_script( 'w3tc-widget' );
- }
-}
diff --git a/wp-content/plugins/w3-total-cache/Generic_Plugin_WidgetNews.php b/wp-content/plugins/w3-total-cache/Generic_Plugin_WidgetNews.php
deleted file mode 100644
index 8942c1db..00000000
--- a/wp-content/plugins/w3-total-cache/Generic_Plugin_WidgetNews.php
+++ /dev/null
@@ -1,155 +0,0 @@
-_config = Dispatcher::config();
- }
-
- /**
- * Runs plugin.
- */
- public function run() {
- if ( Util_Admin::get_current_wp_page() === 'w3tc_dashboard' ) {
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
- }
-
- add_action( 'w3tc_widget_setup', array( $this, 'wp_dashboard_setup' ) );
- add_action( 'w3tc_network_dashboard_setup', array( $this, 'wp_dashboard_setup' ) );
-
- if ( is_admin() ) {
- add_action( 'wp_ajax_w3tc_widget_latest_news_ajax', array( $this, 'action_widget_latest_news_ajax' ) );
- }
- }
-
- /**
- * Dashboard setup action.
- */
- public function wp_dashboard_setup() {
- Util_Widget::add(
- 'w3tc_latest_news',
- __( 'News', 'w3-total-cache' ),
- array(
- $this,
- 'widget_latest',
- ),
- array(
- $this,
- 'widget_latest_control',
- ),
- 'side'
- );
- }
-
- /**
- * Returns key for transient cache of "widget latest"
- *
- * @return string
- */
- public function _widget_latest_cache_key() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
- return 'dash_' . md5( 'w3tc_latest_news' );
- }
-
- /**
- * Prints latest widget contents
- *
- * @return void
- */
- public function widget_latest() {
- $output = get_transient( $this->_widget_latest_cache_key() );
-
- if ( false !== $output ) {
- echo wp_kses(
- $output,
- array(
- 'a' => array(
- 'href' => array(),
- 'target' => array(),
- ),
- 'h4' => array(),
- 'p' => array(
- 'style' => array(),
- ),
- )
- );
- } else {
- include W3TC_INC_DIR . '/widget/latest_news.php';
- }
- }
-
- /**
- * Prints latest widget contents.
- */
- public function action_widget_latest_news_ajax() {
- // load content of feed.
- global $wp_version;
-
- $items = array();
- $items_count = $this->_config->get_integer( 'widget.latest_news.items' );
-
- include_once ABSPATH . WPINC . '/feed.php';
-
- $feed = fetch_feed( W3TC_NEWS_FEED_URL );
-
- if ( ! is_wp_error( $feed ) ) {
- $feed_items = $feed->get_items( 0, $items_count );
-
- foreach ( $feed_items as $feed_item ) {
- $items[] = array(
- 'link' => $feed_item->get_link(),
- 'title' => htmlspecialchars_decode( $feed_item->get_title() ),
- );
- }
- }
-
- ob_start();
- include W3TC_INC_DIR . '/widget/latest_news_ajax.php';
-
- // Default lifetime in cache of 12 hours (same as the feeds).
- set_transient( $this->_widget_latest_cache_key(), ob_get_flush(), 43200 );
- die();
- }
-
- /**
- * Latest widget control.
- *
- * @param integer $widget_id Widget id.
- * @param array $form_inputs Form inputs.
- */
- public function widget_latest_control( $widget_id, $form_inputs = array() ) {
- if ( 'POST' === ( isset( $_SERVER['REQUEST_METHOD'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_METHOD'] ) ) : '' ) ) {
- $this->_config->set( 'widget.latest_news.items', Util_Request::get_integer( 'w3tc_widget_latest_news_items', 3 ) );
- $this->_config->save();
- delete_transient( $this->_widget_latest_cache_key() );
- }
- include W3TC_INC_DIR . '/widget/latest_news_control.php';
- }
-
- /**
- * Enqueue scripts and styles.
- */
- public function enqueue() {
- wp_enqueue_style( 'w3tc-widget' );
- wp_enqueue_script( 'w3tc-metadata' );
- wp_enqueue_script( 'w3tc-widget' );
- }
-}
diff --git a/wp-content/plugins/w3-total-cache/Generic_WidgetAccount.php b/wp-content/plugins/w3-total-cache/Generic_WidgetAccount.php
new file mode 100644
index 00000000..e8ec654c
--- /dev/null
+++ b/wp-content/plugins/w3-total-cache/Generic_WidgetAccount.php
@@ -0,0 +1,58 @@
+' . __( 'Account', 'w3-total-cache' ) . '
',
+ array( $this, 'widget_form' ),
+ null,
+ 'normal'
+ );
+ }
+
+ /**
+ * Premium Services widget content.
+ *
+ * @since X.X.X
+ *
+ * @return void
+ */
+ public function widget_form() {
+ include W3TC_DIR . '/Generic_WidgetAccount_View.php';
+ }
+}
diff --git a/wp-content/plugins/w3-total-cache/Generic_WidgetAccount_View.php b/wp-content/plugins/w3-total-cache/Generic_WidgetAccount_View.php
new file mode 100644
index 00000000..47f25a9b
--- /dev/null
+++ b/wp-content/plugins/w3-total-cache/Generic_WidgetAccount_View.php
@@ -0,0 +1,77 @@
+get_license_key();
+$license = Licensing_Core::check_license( $license_key, W3TC_VERSION );
+?>
+
+
+
+ license_status === 'active.by_rooturi' ? __( 'Pro', 'w3-total-cache' ) : __( 'Free', 'w3-total-cache' ); ?>
+
+
+
+
+ license_status:
+ esc_html_e( 'Active', 'w3-total-cache' );
+ break;
+ case 'inactive.expired' === $license->license_status:
+ esc_html_e( 'Expired', 'w3-total-cache' );
+ break;
+ case 'invalid.not_present' === $license->license_status:
+ esc_html_e( 'Free license, no expiration', 'w3-total-cache' );
+ break;
+ default:
+ esc_html_e( 'Unknown', 'w3-total-cache' );
+ }
+ } else {
+ esc_html_e( 'Free license, no expiration', 'w3-total-cache' );
+ }
+ ?>
+
+
+
+
+license_status === 'invalid.not_present' ) ) {
+ ?>
+
+ ',
+ ''
+ ),
+ array( 'strong' => array() )
+ );
+ ?>
+
+
+
+
+
diff --git a/wp-content/plugins/w3-total-cache/Generic_WidgetBoldGrid.php b/wp-content/plugins/w3-total-cache/Generic_WidgetBoldGrid.php
index 6b8b956e..d55bf229 100644
--- a/wp-content/plugins/w3-total-cache/Generic_WidgetBoldGrid.php
+++ b/wp-content/plugins/w3-total-cache/Generic_WidgetBoldGrid.php
@@ -10,7 +10,7 @@ class Generic_WidgetBoldGrid {
$o = new Generic_WidgetBoldGrid();
- Util_Widget::add2( 'w3tc_boldgrid', 5000,
+ Util_Widget::add2( 'w3tc_boldgrid', 800,
'
',
array( $o, 'widget_form' ),
self_admin_url(
diff --git a/wp-content/plugins/w3-total-cache/Generic_WidgetCommunity.php b/wp-content/plugins/w3-total-cache/Generic_WidgetCommunity.php
deleted file mode 100644
index 7812443d..00000000
--- a/wp-content/plugins/w3-total-cache/Generic_WidgetCommunity.php
+++ /dev/null
@@ -1,53 +0,0 @@
-' .
- '' .
- __( 'W3TC Community Edition', 'w3-total-cache' ) .
- '
',
- array( $this, 'widget_form' ),
- null,
- 'normal'
- );
- }
-
- /**
- * Render the content of our widget.
- *
- * @since 0.14.3
- */
- public function widget_form() {
- include W3TC_DIR . '/Generic_WidgetCommunity_View.php';
- }
-}
diff --git a/wp-content/plugins/w3-total-cache/Generic_WidgetCommunity_View.php b/wp-content/plugins/w3-total-cache/Generic_WidgetCommunity_View.php
deleted file mode 100644
index e7ad0167..00000000
--- a/wp-content/plugins/w3-total-cache/Generic_WidgetCommunity_View.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
- ',
- ''
- ),
- array( 'strong' => array() )
- ); ?>
-
-
-
-
-
- ',
- ''
- ),
- array( 'strong' => array() )
- ); ?>
-
-
-
-
-
diff --git a/wp-content/plugins/w3-total-cache/Generic_WidgetPartners.php b/wp-content/plugins/w3-total-cache/Generic_WidgetPartners.php
new file mode 100644
index 00000000..42a83078
--- /dev/null
+++ b/wp-content/plugins/w3-total-cache/Generic_WidgetPartners.php
@@ -0,0 +1,58 @@
+' . __( 'Setup Guides from Partner Hosts', 'w3-total-cache' ) . '
',
+ array( $this, 'widget_form' ),
+ null,
+ 'normal'
+ );
+ }
+
+ /**
+ * Premium Services widget content.
+ *
+ * @since X.X.X
+ *
+ * @return void
+ */
+ public function widget_form() {
+ include W3TC_DIR . '/Generic_WidgetPartners_View.php';
+ }
+}
diff --git a/wp-content/plugins/w3-total-cache/Generic_WidgetPartners_View.php b/wp-content/plugins/w3-total-cache/Generic_WidgetPartners_View.php
new file mode 100644
index 00000000..bc45af7d
--- /dev/null
+++ b/wp-content/plugins/w3-total-cache/Generic_WidgetPartners_View.php
@@ -0,0 +1,37 @@
+
+
+
+
+
+?
diff --git a/wp-content/plugins/w3-total-cache/Generic_WidgetServices.php b/wp-content/plugins/w3-total-cache/Generic_WidgetServices.php
index 2133539c..a55030d9 100644
--- a/wp-content/plugins/w3-total-cache/Generic_WidgetServices.php
+++ b/wp-content/plugins/w3-total-cache/Generic_WidgetServices.php
@@ -8,7 +8,7 @@
namespace W3TC;
/**
- * Class Generic_Plugin_WidgetServices
+ * Class Generic_WidgetServices
*/
class Generic_WidgetServices {
/**
@@ -24,8 +24,8 @@ class Generic_WidgetServices {
*/
public static function admin_init_w3tc_dashboard() {
$o = new Generic_WidgetServices();
- add_action( 'w3tc_widget_setup', array( $o, 'wp_dashboard_setup' ), 5000 );
- add_action( 'w3tc_network_dashboard_setup', array( $o, 'wp_dashboard_setup' ), 5000 );
+ add_action( 'w3tc_widget_setup', array( $o, 'wp_dashboard_setup' ), 600 );
+ add_action( 'w3tc_network_dashboard_setup', array( $o, 'wp_dashboard_setup' ), 600 );
}
/**
diff --git a/wp-content/plugins/w3-total-cache/Generic_WidgetSettings.php b/wp-content/plugins/w3-total-cache/Generic_WidgetSettings.php
new file mode 100644
index 00000000..7f58668c
--- /dev/null
+++ b/wp-content/plugins/w3-total-cache/Generic_WidgetSettings.php
@@ -0,0 +1,56 @@
+' . __( 'General Settings', 'w3-total-cache' ) . '
',
+ array( $this, 'widget_form' ),
+ null,
+ 'normal'
+ );
+ }
+
+ /**
+ * Premium Services widget content.
+ *
+ * @since X.X.X
+ *
+ * @return void
+ */
+ public function widget_form() {
+ include W3TC_DIR . '/Generic_WidgetSettings_View.php';
+ }
+}
diff --git a/wp-content/plugins/w3-total-cache/Generic_WidgetSettings_View.php b/wp-content/plugins/w3-total-cache/Generic_WidgetSettings_View.php
new file mode 100644
index 00000000..be51f912
--- /dev/null
+++ b/wp-content/plugins/w3-total-cache/Generic_WidgetSettings_View.php
@@ -0,0 +1,98 @@
+ array(
+ 'label' => esc_html__( 'Preview Mode', 'w3-total-cache' ),
+ 'enabled' => Util_Environment::is_preview_mode(),
+ ),
+ 'pgcache' => array(
+ 'label' => esc_html__( 'Page Cache', 'w3-total-cache' ),
+ 'enabled' => $config->get_boolean( 'pgcache.enabled' ),
+ ),
+ 'minify' => array(
+ 'label' => esc_html__( 'Minify', 'w3-total-cache' ),
+ 'enabled' => $config->get_boolean( 'minify.enabled' ),
+ ),
+ 'opcode' => array(
+ 'label' => esc_html__( 'Opcode Cache', 'w3-total-cache' ),
+ 'enabled' => Util_Installed::opcache() || Util_Installed::apc_opcache(),
+ ),
+ 'dbcache' => array(
+ 'label' => esc_html__( 'Database Cache', 'w3-total-cache' ),
+ 'enabled' => $config->get_boolean( 'dbcache.enabled' ),
+ ),
+ 'objectcache' => array(
+ 'label' => esc_html__( 'Object Cache', 'w3-total-cache' ),
+ 'enabled' => $config->getf_boolean( 'objectcache.enabled' ),
+ ),
+ 'browsercache' => array(
+ 'label' => esc_html__( 'Browser Cache', 'w3-total-cache' ),
+ 'enabled' => $config->getf_boolean( 'browsercache.enabled' ),
+ ),
+ 'cdn' => array(
+ 'label' => esc_html__( 'CDN', 'w3-total-cache' ),
+ 'enabled' => $config->get_boolean( 'cdn.enabled' ) || $config->get_boolean( 'cdnfsd.enabled' ),
+ ),
+ 'varnish' => array(
+ 'label' => esc_html__( 'Reverse Proxy', 'w3-total-cache' ),
+ 'enabled' => $config->get_boolean( 'varnish.enabled' ),
+ ),
+ 'stats' => array(
+ 'label' => esc_html__( 'Statistics', 'w3-total-cache' ),
+ 'enabled' => $config->get_boolean( 'stats.enabled' ),
+ ),
+ 'fragmentcache' => array(
+ 'label' => esc_html__( 'Fragment Cache', 'w3-total-cache' ),
+ 'enabled' => $config->is_extension_active_frontend( 'fragmentcache' ) && Util_Environment::is_w3tc_pro( $config ),
+ ),
+ 'debug' => array(
+ 'label' => esc_html__( 'Debug', 'w3-total-cache' ),
+ 'enabled' => $config->get_boolean( 'pgcache.debug' )
+ || $config->get_boolean( 'pgcache.debug_purge' )
+ || $config->get_boolean( 'minify.debug' )
+ || $config->get_boolean( 'dbcache.debug' )
+ || $config->get_boolean( 'dbcache.debug_purge' )
+ || $config->get_boolean( 'objectcache.debug' )
+ || $config->get_boolean( 'objectcache.debug_purge' )
+ || $config->get_boolean( array( 'fragmentcache', 'debug' ) )
+ || $config->get_boolean( 'cdn.debug' )
+ || $config->get_boolean( 'cdnfsd.debug' )
+ || $config->get_boolean( 'varnish.debug' )
+ || $config->get_boolean( 'cluster.messagebus.debug' ),
+ ),
+);
+?>
+
+
+
+
diff --git a/wp-content/plugins/w3-total-cache/Generic_WidgetSpreadTheWord_Plugin.php b/wp-content/plugins/w3-total-cache/Generic_WidgetSpreadTheWord_Plugin.php
index 5f9a7fde..6b69b2b2 100644
--- a/wp-content/plugins/w3-total-cache/Generic_WidgetSpreadTheWord_Plugin.php
+++ b/wp-content/plugins/w3-total-cache/Generic_WidgetSpreadTheWord_Plugin.php
@@ -22,14 +22,8 @@ class Generic_WidgetSpreadTheWord_Plugin {
if ( Util_Admin::get_current_wp_page() == 'w3tc_dashboard' )
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
- add_action( 'w3tc_widget_setup', array(
- $this,
- 'wp_dashboard_setup'
- ), 4000 );
- add_action( 'w3tc_network_dashboard_setup', array(
- $this,
- 'wp_dashboard_setup'
- ), 4000 );
+ add_action( 'w3tc_widget_setup', array( $this, 'wp_dashboard_setup' ), 900 );
+ add_action( 'w3tc_network_dashboard_setup', array( $this, 'wp_dashboard_setup' ), 900 );
}
/**
@@ -45,7 +39,7 @@ class Generic_WidgetSpreadTheWord_Plugin {
'',
array( $this, 'widget_form' ),
null,
- 'normal' );
+ 'bottom' );
}
function widget_form() {
diff --git a/wp-content/plugins/w3-total-cache/Generic_WidgetStats.js b/wp-content/plugins/w3-total-cache/Generic_WidgetStats.js
new file mode 100644
index 00000000..46983999
--- /dev/null
+++ b/wp-content/plugins/w3-total-cache/Generic_WidgetStats.js
@@ -0,0 +1,110 @@
+/**
+ * W3TC stats widgets Google Charts driver.
+ *
+ * @file Google Charts driver for W3TC dashboard stats widgets.
+ * @author W3TC.
+ * @version 1.0
+ * @since X.X.X
+ */
+
+jQuery(document).ready(function($) {
+ google.charts.load('current', {packages: ['corechart', 'line']});
+ google.charts.setOnLoadCallback(load);
+
+ // Interval to refresh stats widgets every 60 seconds.
+ setInterval(function () {
+ load();
+ }, 60000);
+
+ // Refresh charts on resize.
+ jQuery(window).resize(function(){
+ load();
+ });
+
+ // Load method for stat charts. Fires on document ready, window resize, and on 60 second interval.
+ function load() {
+ $.getJSON(
+ ajaxurl + '?action=w3tc_ajax&_wpnonce=' + w3tc_nonce + '&w3tc_action=ustats_get',
+ function(data) {
+ if(! data.period.seconds){
+ $('#w3tc_page_cache').addClass('w3tc_none');
+ $('#w3tc_object_cache').addClass('w3tc_none');
+ $('#w3tc_database_cache').addClass('w3tc_none');
+ return;
+ }
+ processed_data = preprocess_data(data);
+ draw_charts(processed_data);
+ }
+ );
+ }
+
+ // Preprocesses statistics data for chart use.
+ /**
+ * @param {array} data Statistics data.
+ * @returns {array} Statistics data in format required for Google charts.
+ */
+ function preprocess_data(data){
+ var processed_data = {
+ 'page_cache':{'data':[],'color':'#6f9654'},
+ 'object_cache':{'data':[],'color':'#e2431e'},
+ 'database_cache':{'data':[],'color':'#43459d'}
+ };
+ for( var i=40; i' . __( 'Page Cache: Hits', 'w3-total-cache' ) . '
',
+ array( $this, 'page_cache_widget_form' ),
+ null,
+ 'normal'
+ );
+
+ Util_Widget::add(
+ 'w3tc_object_cache',
+ '
' . __( 'Object Cache: Hits', 'w3-total-cache' ) . '
',
+ array( $this, 'object_cache_widget_form' ),
+ null,
+ 'normal'
+ );
+
+ Util_Widget::add(
+ 'w3tc_database_cache',
+ '
' . __( 'Database Cache: Hits', 'w3-total-cache' ) . '
',
+ array( $this, 'database_cache_widget_form' ),
+ null,
+ 'normal'
+ );
+ }
+
+ /**
+ * Web Requests widget content.
+ *
+ * @since X.X.X
+ *
+ * @return void
+ */
+ public function page_cache_widget_form() {
+ $chart = self::get_chart_content(
+ array(
+ 'chart_id' => 'page_cache_chart',
+ 'setting_key' => 'pgcache.enabled',
+ 'cache_enable_label' => __( 'Enable PageCache', 'w3-total-cache' ),
+ 'cache_enable_url' => Util_Ui::admin_url( 'admin.php?page=w3tc_general#page_cache' ),
+ )
+ );
+ echo wp_kses( $chart, self::get_allowed_tags() );
+ }
+
+ /**
+ * Object Cache widget content.
+ *
+ * @since X.X.X
+ *
+ * @return void
+ */
+ public function object_cache_widget_form() {
+ $chart = self::get_chart_content(
+ array(
+ 'chart_id' => 'object_cache_chart',
+ 'setting_key' => 'objectcache.enabled',
+ 'cache_enable_label' => __( 'Enable ObjectCache', 'w3-total-cache' ),
+ 'cache_enable_url' => Util_Ui::admin_url( 'admin.php?page=w3tc_general#object_cache' ),
+ )
+ );
+ echo wp_kses( $chart, self::get_allowed_tags() );
+ }
+
+ /**
+ * Database widget content.
+ *
+ * @since X.X.X
+ *
+ * @return void
+ */
+ public function database_cache_widget_form() {
+ $chart = self::get_chart_content(
+ array(
+ 'chart_id' => 'database_cache_chart',
+ 'setting_key' => 'dbcache.enabled',
+ 'cache_enable_label' => __( 'Enable DBCache', 'w3-total-cache' ),
+ 'cache_enable_url' => Util_Ui::admin_url( 'admin.php?page=w3tc_general#database_cache' ),
+ )
+ );
+ echo wp_kses( $chart, self::get_allowed_tags() );
+ }
+
+ /**
+ * Get button link allowed tags.
+ *
+ * @since X.X.X
+ *
+ * @param array $chart_config Chart configuration array.
+ *
+ * @return string
+ */
+ public static function get_chart_content( $chart_config ) {
+ $config = Dispatcher::config();
+ $chart_id = $chart_config['chart_id'];
+ $chart_content = '';
+ if ( ! Util_Environment::is_w3tc_pro( $config ) ) {
+ $chart_id .= '_ad';
+ $chart_content = ' ';
+ } elseif ( ! $config->get_boolean( 'stats.enabled' ) ) {
+ $chart_id .= '_enable';
+ $chart_content = Util_Ui::button_link( __( 'Enable Statistics', 'w3-total-cache' ), Util_Ui::admin_url( 'admin.php?page=w3tc_general#stats' ), false, 'button-primary' );
+ } elseif ( ! $config->get_boolean( $chart_config['setting_key'] ) ) {
+ $chart_id .= '_subenable';
+ $chart_content = Util_Ui::button_link( $chart_config['cache_enable_label'], $chart_config['cache_enable_url'], false, 'button-primary' );
+ }
+ return '' . $chart_content . '
';
+ }
+
+ /**
+ * Get button link allowed tags.
+ *
+ * @since X.X.X
+ *
+ * @return array
+ */
+ public static function get_allowed_tags() {
+ return array(
+ 'div' => array(
+ 'id' => array(),
+ ),
+ 'input' => array(
+ 'type' => array(),
+ 'name' => array(),
+ 'class' => array(),
+ 'value' => array(),
+ 'onclick' => array(),
+ 'data-src' => array(),
+ ),
+ );
+ }
+}
diff --git a/wp-content/plugins/w3-total-cache/Minify_Core.php b/wp-content/plugins/w3-total-cache/Minify_Core.php
index 45bcc44a..9dab8513 100644
--- a/wp-content/plugins/w3-total-cache/Minify_Core.php
+++ b/wp-content/plugins/w3-total-cache/Minify_Core.php
@@ -9,19 +9,17 @@ class Minify_Core {
* Encode an array of files into a filename containing all files.
*/
static public function urls_for_minification_to_minify_filename( $files, $type ) {
- $v = get_option( 'w3tc_minify' );
- $minify_filenames = @json_decode( $v, true );
- if ( !is_array( $minify_filenames ) )
- $minify_filenames = array();
-
$files_string = json_encode( $files );
- $key = substr( md5( $files_string ), 0, 5 );
- // collision protection
- if ( isset( $minify_filenames[$key] ) ) {
- $files_stored = $minify_filenames[$key];
- if ( json_encode( $files_stored ) != $files_string ) {
- $key = md5( $files_string );
+ $key = self::urls_for_minification_to_minify_key( $files_string,
+ substr( md5( $files_string ), 0, 5 ) );
+ if ( is_null( $key ) ) {
+ // key collision (rare case), try full md5
+ $key = self::urls_for_minification_to_minify_key( $files_string,
+ md5( $files_string ) );
+ if ( is_null( $key ) ) {
+ // collision of full md5 - unprobable
+ return null;
}
}
@@ -30,13 +28,26 @@ class Minify_Core {
'w3tc_minify_urls_for_minification_to_minify_filename',
$minify_filename, $files, $type );
- $minify_filenames[$minify_filename] = $files;
- update_option( 'w3tc_minify', json_encode( $minify_filenames ), false );
-
return $minify_filename;
}
+ /**
+ * Tries key for minified array of files
+ */
+ static private function urls_for_minification_to_minify_key( $files_string, $key ) {
+ $v = get_option( 'w3tc_minify_' . $key );
+ $minify_filenames = @json_decode( $v, true );
+ if ( empty( $minify_filenames ) || !is_array( $minify_filenames ) ) {
+ update_option( 'w3tc_minify_' . $key, $files_string, false );
+ return $key;
+ }
+ if ( $v === $files_string ) {
+ return $key;
+ }
+
+ return null;
+ }
/**
* Decode a minify auto filename into an array of files.
@@ -46,16 +57,12 @@ class Minify_Core {
* @return array
*/
static public function minify_filename_to_urls_for_minification( $filename, $type ) {
- $v = get_option( 'w3tc_minify' );
- $minify_filenames = @json_decode( $v, true );
- if ( !is_array( $minify_filenames ) )
- $minify_filenames = array();
-
- $minify_filename = $filename . '.' . $type;
- if ( !isset( $minify_filenames[$minify_filename] ) )
+ $v = get_option( 'w3tc_minify_' . $filename );
+ $urls_unverified = @json_decode( $v, true );
+ if ( !is_array( $urls_unverified ) ) {
return array();
+ }
- $urls_unverified = $minify_filenames[$minify_filename];
$urls = array();
foreach ( $urls_unverified as $file ) {
diff --git a/wp-content/plugins/w3-total-cache/Minify_GeneralPage_View_ShowHelp.js b/wp-content/plugins/w3-total-cache/Minify_GeneralPage_View_ShowHelp.js
index cf0a0d55..321d6f1e 100644
--- a/wp-content/plugins/w3-total-cache/Minify_GeneralPage_View_ShowHelp.js
+++ b/wp-content/plugins/w3-total-cache/Minify_GeneralPage_View_ShowHelp.js
@@ -1,17 +1,18 @@
function w3tc_show_minify_help() {
- W3tc_Lightbox.open({
- id: 'w3tc-overlay',
- close: '',
- width: 800,
- height: 610,
- url: ajaxurl + '?action=w3tc_ajax&_wpnonce=' + w3tc_nonce +
- '&w3tc_action=minify_help',
- callback: function(lightbox) {
- jQuery('.btn-primary', lightbox.container).click(function() {
- lightbox.close();
- });
- }
- });
+ W3tc_Lightbox.open({
+ id: 'w3tc-overlay',
+ close: '',
+ width: 800,
+ height: 610,
+ url: ajaxurl + '?action=w3tc_ajax&_wpnonce=' + w3tc_nonce +
+ '&w3tc_action=minify_help',
+ callback: function(lightbox) {
+ jQuery('.btn-primary', lightbox.container).click(function() {
+ lightbox.close();
+ });
+ lightbox.resize();
+ }
+ });
}
diff --git a/wp-content/plugins/w3-total-cache/Minify_MinifiedFileRequestHandler.php b/wp-content/plugins/w3-total-cache/Minify_MinifiedFileRequestHandler.php
index e90da9dd..1f6eb288 100644
--- a/wp-content/plugins/w3-total-cache/Minify_MinifiedFileRequestHandler.php
+++ b/wp-content/plugins/w3-total-cache/Minify_MinifiedFileRequestHandler.php
@@ -289,17 +289,25 @@ class Minify_MinifiedFileRequestHandler {
/**
- * Flushes cache
+ * Flushes cache.
*
- * @return boolean
+ * @return bool
*/
- function flush() {
+ public function flush( $extras = array() ) {
$cache = $this->_get_cache();
- // used to debug - which plugin calls flush all the time and breaks
- // performance
+ // Used to debug - which plugin calls flush all the time and breaks performance.
if ( $this->_config->get_boolean( 'minify.debug' ) ) {
Minify_Core::log( 'Minify flush called from' );
- Minify_Core::log( json_encode( debug_backtrace () ) );
+ Minify_Core::log( wp_json_encode( debug_backtrace() ) );
+ }
+
+ /*
+ * Cleanup of map too often is risky since breaks all old minify urls.
+ * Particularly minified urls in browsercached/cdn cached html becomes invalid.
+ */
+ if ( isset( $extras['ui_action'] ) && 'flush_button' === $extras['ui_action'] ) {
+ global $wpdb;
+ $wpdb->query( "DELETE FROM $wpdb->options WHERE `option_name` = 'w3tc_minify' OR `option_name` LIKE 'w3tc_minify_%'" );
}
return $cache->flush();
@@ -543,6 +551,8 @@ class Minify_MinifiedFileRequestHandler {
Minify_Core::debug_error( sprintf( 'Unable to fetch custom files list: "%s.%s"', $hash, $type ), false, 404 );
}
+ Minify_Core::log( implode("\n", $files ) );
+
return $result;
}
diff --git a/wp-content/plugins/w3-total-cache/Minify_Plugin_Admin.php b/wp-content/plugins/w3-total-cache/Minify_Plugin_Admin.php
index 85a988be..5668c479 100644
--- a/wp-content/plugins/w3-total-cache/Minify_Plugin_Admin.php
+++ b/wp-content/plugins/w3-total-cache/Minify_Plugin_Admin.php
@@ -263,10 +263,10 @@ class Minify_Plugin_Admin {
}
if ( isset( $v['size_used'] ) ) {
- $a['size_used'] = $v['size_used'];
- $a['size_items'] = $v['size_items'];
- $a['size_compression_css'] = $v['size_compression_css'];
- $a['size_compression_js'] = $v['size_compression_js'];
+ $a['size_used'] = $v['size_used'];
+ $a['size_items'] = empty( $v['size_items'] ) ? null : $v['size_items'];
+ $a['size_compression_css'] = empty( $v['size_compression_css'] ) ? null : $v['size_compression_css'];
+ $a['size_compression_js'] = empty( $v['size_compression_js'] ) ? null : $v['size_compression_js'];
}
}
diff --git a/wp-content/plugins/w3-total-cache/PageSpeed_Data.php b/wp-content/plugins/w3-total-cache/PageSpeed_Data.php
index 434a5a7f..940aa8a1 100644
--- a/wp-content/plugins/w3-total-cache/PageSpeed_Data.php
+++ b/wp-content/plugins/w3-total-cache/PageSpeed_Data.php
@@ -31,28 +31,34 @@ class PageSpeed_Data {
return array(
'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'categories', 'performance', 'score' ) ) * 100,
'first-contentful-paint' => array(
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'first-contentful-paint', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'first-contentful-paint', 'displayValue' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'first-contentful-paint', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'first-contentful-paint', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'first-contentful-paint', 'displayValue' ) ),
),
'largest-contentful-paint' => array(
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'largest-contentful-paint', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'largest-contentful-paint', 'displayValue' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'largest-contentful-paint', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'largest-contentful-paint', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'largest-contentful-paint', 'displayValue' ) ),
),
'interactive' => array(
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'interactive', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'interactive', 'displayValue' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'interactive', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'interactive', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'interactive', 'displayValue' ) ),
),
'cumulative-layout-shift' => array(
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'cumulative-layout-shift', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'cumulative-layout-shift', 'displayValue' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'cumulative-layout-shift', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'cumalative-layout-shift', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'cumulative-layout-shift', 'displayValue' ) ),
),
'total-blocking-time' => array(
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'total-blocking-time', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'total-blocking-time', 'displayValue' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'total-blocking-time', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'total-blocking-time', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'total-blocking-time', 'displayValue' ) ),
),
'speed-index' => array(
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'speed-index', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'speed-index', 'displayValue' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'speed-index', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'speed-index', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'speed-index', 'displayValue' ) ),
),
'screenshots' => array(
'final' => array(
@@ -66,372 +72,384 @@ class PageSpeed_Data {
),
'opportunities' => array(
'render-blocking-resources' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'render-blocking-resources', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'render-blocking-resources', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'render-blocking-resources', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'render-blocking-resources', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'render-blocking-resources', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'render-blocking-resources', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'render-blocking-resources', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'render-blocking-resources', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'render-blocking-resources', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'render-blocking-resources', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'render-blocking-resources', 'details', 'items' ) ),
+ 'type' => array(
'FCP',
'LCP',
),
),
'unused-css-rules' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-css-rules', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-css-rules', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-css-rules', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-css-rules', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-css-rules', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-css-rules', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-css-rules', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-css-rules', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-css-rules', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-css-rules', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-css-rules', 'details', 'items' ) ),
+ 'type' => array(
'FCP',
'LCP',
),
),
'unminified-css' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-css', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-css', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-css', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-css', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-css', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-css', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-css', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-css', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-css', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-css', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-css', 'details', 'items' ) ),
+ 'type' => array(
'FCP',
'LCP',
),
),
'unminified-javascript' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-javascript', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-javascript', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-javascript', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-javascript', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-javascript', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-javascript', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-javascript', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-javascript', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-javascript', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-javascript', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unminified-javascript', 'details', 'items' ) ),
+ 'type' => array(
'FCP',
'LCP',
),
),
'unused-javascript' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-javascript', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-javascript', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-javascript', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-javascript', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-javascript', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-javascript', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-javascript', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-javascript', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-javascript', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-javascript', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unused-javascript', 'details', 'items' ) ),
+ 'type' => array(
'LCP',
),
),
'uses-responsive-images' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-responsive-images', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-responsive-images', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-responsive-images', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-responsive-images', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-responsive-images', 'details', 'items' ) ),
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-responsive-images', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-responsive-images', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-responsive-images', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-responsive-images', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-responsive-images', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-responsive-images', 'details', 'items' ) ),
),
'offscreen-images' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'offscreen-images', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'offscreen-images', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'offscreen-images', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'offscreen-images', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'offscreen-images', 'details', 'items' ) ),
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'offscreen-images', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'offscreen-images', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'offscreen-images', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'offscreen-images', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'offscreen-images', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'offscreen-images', 'details', 'items' ) ),
),
'uses-optimized-images' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-optimized-images', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-optimized-images', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-optimized-images', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-optimized-images', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-optimized-images', 'details', 'items' ) ),
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-optimized-images', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-optimized-images', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-optimized-images', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-optimized-images', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-optimized-images', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-optimized-images', 'details', 'items' ) ),
),
'modern-image-formats' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'modern-image-formats', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'modern-image-formats', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'modern-image-formats', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'modern-image-formats', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'modern-image-formats', 'details', 'items' ) ),
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'modern-image-formats', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'modern-image-formats', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'modern-image-formats', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'modern-image-formats', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'modern-image-formats', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'modern-image-formats', 'details', 'items' ) ),
),
'uses-text-compression' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-text-compression', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-text-compression', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-text-compression', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-text-compression', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-text-compression', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-text-compression', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-text-compression', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-text-compression', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-text-compression', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-text-compression', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-text-compression', 'details', 'items' ) ),
+ 'type' => array(
'FCP',
'LCP',
),
),
'uses-rel-preconnect' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preconnect', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preconnect', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preconnect', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preconnect', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preconnect', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preconnect', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preconnect', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preconnect', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preconnect', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preconnect', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preconnect', 'details', 'items' ) ),
+ 'type' => array(
'FCP',
'LCP',
),
),
'server-response-time' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'server-response-time', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'server-response-time', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'server-response-time', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'server-response-time', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'server-response-time', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'server-response-time', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'server-response-time', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'server-response-time', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'server-response-time', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'server-response-time', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'server-response-time', 'details', 'items' ) ),
+ 'type' => array(
'FCP',
'LCP',
),
),
'redirects' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'redirects', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'redirects', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'redirects', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'redirects', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'redirects', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'redirects', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'redirects', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'redirects', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'redirects', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'redirects', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'redirects', 'details', 'items' ) ),
+ 'type' => array(
'FCP',
'LCP',
),
),
'uses-rel-preload' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preload', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preload', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preload', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preload', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preload', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preload', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preload', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preload', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preload', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preload', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-rel-preload', 'details', 'items' ) ),
+ 'type' => array(
'FCP',
'LCP',
),
),
'efficient-animated-content' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'efficient-animated-content', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'efficient-animated-content', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'efficient-animated-content', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'efficient-animated-content', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'efficient-animated-content', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'efficient-animated-content', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'efficient-animated-content', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'efficient-animated-content', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'efficient-animated-content', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'efficient-animated-content', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'efficient-animated-content', 'details', 'items' ) ),
+ 'type' => array(
'LCP',
),
),
'duplicated-javascript' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'duplicated-javascript', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'duplicated-javascript', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'duplicated-javascript', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'duplicated-javascript', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'duplicated-javascript', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'duplicated-javascript', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'duplicated-javascript', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'duplicated-javascript', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'duplicated-javascript', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'duplicated-javascript', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'duplicated-javascript', 'details', 'items' ) ),
+ 'type' => array(
'TBT',
),
),
'legacy-javascript' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'legacy-javascript', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'legacy-javascript', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'legacy-javascript', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'legacy-javascript', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'legacy-javascript', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'legacy-javascript', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'legacy-javascript', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'legacy-javascript', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'legacy-javascript', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'legacy-javascript', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'legacy-javascript', 'details', 'items' ) ),
+ 'type' => array(
'TBT',
),
),
- 'preload-lcp-image' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'preload-lcp-image', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'preload-lcp-image', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'preload-lcp-image', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'preload-lcp-image', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'preload-lcp-image', 'details', 'items' ) ),
- 'type' => array(
- 'LCP',
- ),
- ),
'total-byte-weight' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'total-byte-weight', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'total-byte-weight', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'total-byte-weight', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'total-byte-weight', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'total-byte-weight', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'total-byte-weight', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'total-byte-weight', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'total-byte-weight', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'total-byte-weight', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'total-byte-weight', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'total-byte-weight', 'details', 'items' ) ),
+ 'type' => array(
'LCP',
),
),
'dom-size' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'dom-size', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'dom-size', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'dom-size', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'dom-size', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'dom-size', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'dom-size', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'dom-size', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'dom-size', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'dom-size', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'dom-size', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'dom-size', 'details', 'items' ) ),
+ 'type' => array(
'TBT',
),
),
'user-timings' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'user-timings', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'user-timings', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'user-timings', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'user-timings', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'user-timings', 'details', 'items' ) ),
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'user-timings', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'user-timings', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'user-timings', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'user-timings', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'user-timings', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'user-timings', 'details', 'items' ) ),
),
'bootup-time' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'bootup-time', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'bootup-time', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'bootup-time', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'bootup-time', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'bootup-time', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'bootup-time', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'bootup-time', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'bootup-time', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'bootup-time', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'bootup-time', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'bootup-time', 'details', 'items' ) ),
+ 'type' => array(
'TBT',
),
),
'mainthread-work-breakdown' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'mainthread-work-breakdown', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'mainthread-work-breakdown', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'mainthread-work-breakdown', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'mainthread-work-breakdown', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'mainthread-work-breakdown', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'mainthread-work-breakdown', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'mainthread-work-breakdown', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'mainthread-work-breakdown', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'mainthread-work-breakdown', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'mainthread-work-breakdown', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'mainthread-work-breakdown', 'details', 'items' ) ),
+ 'type' => array(
'TBT',
),
),
'third-party-summary' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-summary', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-summary', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-summary', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-summary', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-summary', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-summary', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-summary', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-summary', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-summary', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-summary', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-summary', 'details', 'items' ) ),
+ 'type' => array(
'TBT',
),
),
'third-party-facades' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-facades', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-facades', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-facades', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-facades', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-facades', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-facades', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-facades', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-facades', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-facades', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-facades', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'third-party-facades', 'details', 'items' ) ),
+ 'type' => array(
'TBT',
),
),
'lcp-lazy-loaded' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'lcp-lazy-loaded', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'lcp-lazy-loaded', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'lcp-lazy-loaded', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'lcp-lazy-loaded', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'lcp-lazy-loaded', 'details', 'items' ) ),
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'lcp-lazy-loaded', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'lcp-lazy-loaded', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'lcp-lazy-loaded', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'lcp-lazy-loaded', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'lcp-lazy-loaded', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'lcp-lazy-loaded', 'details', 'items' ) ),
),
'uses-passive-event-listeners' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-passive-event-listeners', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-passive-event-listeners', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-passive-event-listeners', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-passive-event-listeners', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-passive-event-listeners', 'details', 'items' ) ),
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-passive-event-listeners', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-passive-event-listeners', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-passive-event-listeners', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-passive-event-listeners', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-passive-event-listeners', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-passive-event-listeners', 'details', 'items' ) ),
),
'no-document-write' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'no-document-write', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'no-document-write', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'no-document-write', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'no-document-write', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'no-document-write', 'details', 'items' ) ),
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'no-document-write', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'no-document-write', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'no-document-write', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'no-document-write', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'no-document-write', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'no-document-write', 'details', 'items' ) ),
),
'non-composited-animations' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'non-composited-animations', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'non-composited-animations', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'non-composited-animations', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'non-composited-animations', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'non-composited-animations', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'non-composited-animations', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'non-composited-animations', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'non-composited-animations', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'non-composited-animations', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'non-composited-animations', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'non-composited-animations', 'details', 'items' ) ),
+ 'type' => array(
'CLS',
),
),
'unsized-images' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unsized-images', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unsized-images', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unsized-images', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unsized-images', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unsized-images', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unsized-images', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unsized-images', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unsized-images', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unsized-images', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unsized-images', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'unsized-images', 'details', 'items' ) ),
+ 'type' => array(
'CLS',
),
),
'viewport' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'viewport', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'viewport', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'viewport', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'viewport', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'viewport', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'viewport', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'viewport', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'viewport', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'viewport', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'viewport', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'viewport', 'details', 'items' ) ),
+ 'type' => array(
'TBT',
),
),
),
'diagnostics' => array(
'font-display' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'font-display', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'font-display', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'font-display', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'font-display', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'font-display', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'font-display', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'font-display', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'font-display', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'font-display', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'font-display', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'font-display', 'details', 'items' ) ),
+ 'type' => array(
'FCP',
'LCP',
),
),
- 'first-contentful-paint-3g' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'first-contentful-paint-3g', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'first-contentful-paint-3g', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'first-contentful-paint-3g', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'first-contentful-paint-3g', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'first-contentful-paint-3g', 'details', 'items' ) ),
- ),
'uses-long-cache-ttl' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-long-cache-ttl', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-long-cache-ttl', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-long-cache-ttl', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-long-cache-ttl', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-long-cache-ttl', 'details', 'items' ) ),
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-long-cache-ttl', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-long-cache-ttl', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-long-cache-ttl', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-long-cache-ttl', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-long-cache-ttl', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'uses-long-cache-ttl', 'details', 'items' ) ),
),
'critical-request-chains' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'critical-request-chains', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'critical-request-chains', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'critical-request-chains', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'critical-request-chains', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'critical-request-chains', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'critical-request-chains', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'critical-request-chains', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'critical-request-chains', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'critical-request-chains', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'critical-request-chains', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'critical-request-chains', 'details', 'items' ) ),
+ 'type' => array(
'FCP',
'LCP',
),
),
- 'resource-summary' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'resource-summary', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'resource-summary', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'resource-summary', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'resource-summary', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'resource-summary', 'details', 'items' ) ),
- ),
'largest-contentful-paint-element' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'largest-contentful-paint-element', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'largest-contentful-paint-element', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'largest-contentful-paint-element', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'largest-contentful-paint-element', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'largest-contentful-paint-element', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'largest-contentful-paint-element', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'largest-contentful-paint-element', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'largest-contentful-paint-element', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'largest-contentful-paint-element', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'largest-contentful-paint-element', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'largest-contentful-paint-element', 'details', 'items' ) ),
+ 'type' => array(
'LCP',
),
),
'layout-shift-elements' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'layout-shift-elements', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'layout-shift-elements', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'layout-shift-elements', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'layout-shift-elements', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'layout-shift-elements', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'layout-shift-elements', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'layout-shift-elements', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'layout-shift-elements', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'layout-shift-elements', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'layout-shift-elements', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'layout-shift-elements', 'details', 'items' ) ),
+ 'type' => array(
'CLS',
),
),
'long-tasks' => array(
- 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'long-tasks', 'title' ) ),
- 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'long-tasks', 'description' ) ),
- 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'long-tasks', 'score' ) ),
- 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'long-tasks', 'displayValue' ) ),
- 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'long-tasks', 'details', 'items' ) ),
- 'type' => array(
+ 'title' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'long-tasks', 'title' ) ),
+ 'description' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'long-tasks', 'description' ) ),
+ 'score' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'long-tasks', 'score' ) ),
+ 'scoreDisplayMode' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'long-tasks', 'scoreDisplayMode' ) ),
+ 'displayValue' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'long-tasks', 'displayValue' ) ),
+ 'details' => Util_PageSpeed::get_value_recursive( $data, array( 'lighthouseResult', 'audits', 'long-tasks', 'details', 'items' ) ),
+ 'type' => array(
'TBT',
),
),
diff --git a/wp-content/plugins/w3-total-cache/PageSpeed_Instructions.php b/wp-content/plugins/w3-total-cache/PageSpeed_Instructions.php
index b2478a34..46434b11 100644
--- a/wp-content/plugins/w3-total-cache/PageSpeed_Instructions.php
+++ b/wp-content/plugins/w3-total-cache/PageSpeed_Instructions.php
@@ -271,9 +271,6 @@ class PageSpeed_Instructions {
$allowed_tags
) . '',
),
- 'preload-lcp-image' => array(
- 'instructions' => '' . esc_html__( 'Enable lazy load for images.', 'w3-total-cache' ) . '
',
- ),
'total-byte-weight' => array(
'instructions' =>
'' . sprintf(
@@ -507,16 +504,6 @@ class PageSpeed_Instructions {
' . esc_html__( 'Use font-display atribute: The font-display attribute determines how the font is displayed during your page load, based on whether it has been downloaded and is ready for use.', 'w3-total-cache' ) . '
',
),
- 'first-contentful-paint-3g' => array(
- 'instructions' =>
- '' . esc_html__( 'Enable Page Cache using the fastest engine.', 'w3-total-cache' ) . '
- ' . esc_html__( 'What it represents: How much is visible at a time during load.', 'w3-total-cache' ) . '
- ' . esc_html__( 'Lighthouse Performance score weighting: 10%', 'w3-total-cache' ) . '
- ' . esc_html__( 'What it measures: The Speed Index is the average time at which visible parts of the page are displayed.', 'w3-total-cache' ) . '
- ' . esc_html__( 'How it\'s measured: Lighthouse\'s Speed Index measurement comes from a node module called Speedline.', 'w3-total-cache' ) . '
- ' . esc_html__( 'In order for content to be displayed to the user, the browser must first download, parse, and process all external stylesheets it encounters before it can display or render any content to a user\'s screen.', 'w3-total-cache' ) . '
- ' . esc_html__( 'The fastest way to bypass the delay of external resources is to use in-line styles for above-the-fold content.', 'w3-total-cache' ) . '
',
- ),
'uses-long-cache-ttl' => array(
'instructions' =>
'' . sprintf(
@@ -534,16 +521,6 @@ class PageSpeed_Instructions {
'critical-request-chains' => array(
'instructions' => '
' . esc_html__( 'Eliminate Render Blocking CSS and apply asynchronous loading where applicable. Additionally, image optimization by way of resizing, lazy loaidng, and webp conversion can impact this metric as well.', 'w3-total-cache' ) . '
',
),
- 'resource-summary' => array(
- 'instructions' =>
- 'Actions that can help:
-
- ' . esc_html__( 'Avoid multiple page redirects.', 'w3-total-cache' ) . '
- ' . esc_html__( 'Combine images using CSS sprites.', 'w3-total-cache' ) . '
- ' . esc_html__( 'Remove unnecessary third-party scripts.', 'w3-total-cache' ) . '
- ' . esc_html__( 'Compress your text resources.', 'w3-total-cache' ) . '
- ',
- ),
'largest-contentful-paint-element' => array(
'instructions' =>
'' . esc_html__( 'How To Fix Poor LCP', 'w3-total-cache' ) . '
@@ -571,6 +548,7 @@ class PageSpeed_Instructions {
' . esc_html__( 'Optimize and compress images.', 'w3-total-cache' ) . '
' . esc_html__( 'Preload important resources.', 'w3-total-cache' ) . '
+ ' . esc_html__( 'Disable "lazy loading" for assets immediately visible on page load.', 'w3-total-cache' ) . '
' . esc_html__( 'Compress text files.', 'w3-total-cache' ) . '
' . esc_html__( 'Deliver different assets based on the network connection (adaptive serving).', 'w3-total-cache' ) . '
' . esc_html__( 'Cache assets using a service worker.', 'w3-total-cache' ) . '
@@ -588,6 +566,7 @@ class PageSpeed_Instructions {
' . esc_html__( 'Page Cache', 'w3-total-cache' ) . '
' . esc_html__( 'Browser Cache', 'w3-total-cache' ) . '
' . esc_html__( 'CDN', 'w3-total-cache' ) . '
+ ' . esc_html__( 'Preload Requests', 'w3-total-cache' ) . '
',
),
'layout-shift-elements' => array(
diff --git a/wp-content/plugins/w3-total-cache/PageSpeed_Page.php b/wp-content/plugins/w3-total-cache/PageSpeed_Page.php
index 72ce897f..282e707a 100644
--- a/wp-content/plugins/w3-total-cache/PageSpeed_Page.php
+++ b/wp-content/plugins/w3-total-cache/PageSpeed_Page.php
@@ -155,7 +155,7 @@ class PageSpeed_Page {
} else {
$api_response['time'] = time();
$api_response['display_time'] = \current_time( 'M jS, Y g:ia', false );
- update_option( 'w3tc_pagespeed_data_' . $encoded_url, wp_json_encode( $api_response ), 'yes' );
+ update_option( 'w3tc_pagespeed_data_' . $encoded_url, wp_json_encode( $api_response ), 'no' );
}
}
diff --git a/wp-content/plugins/w3-total-cache/PageSpeed_Widget.php b/wp-content/plugins/w3-total-cache/PageSpeed_Widget.php
index eda71b59..bf59bbab 100644
--- a/wp-content/plugins/w3-total-cache/PageSpeed_Widget.php
+++ b/wp-content/plugins/w3-total-cache/PageSpeed_Widget.php
@@ -25,8 +25,8 @@ class PageSpeed_Widget {
* @return void
*/
public function run() {
- add_action( 'w3tc_widget_setup', array( $this, 'wp_dashboard_setup' ), 3000 );
- add_action( 'w3tc_network_dashboard_setup', array( $this, 'wp_dashboard_setup' ), 3000 );
+ add_action( 'w3tc_widget_setup', array( $this, 'wp_dashboard_setup' ), 500 );
+ add_action( 'w3tc_network_dashboard_setup', array( $this, 'wp_dashboard_setup' ), 500 );
add_action( 'w3tc_ajax_pagespeed_widgetdata', array( $this, 'w3tc_ajax_pagespeed_widgetdata' ) );
}
@@ -93,6 +93,26 @@ class PageSpeed_Widget {
$config = Dispatcher::config();
$access_token = $config->get_string( 'widget.pagespeed.access_token' );
+ if ( empty( $access_token ) ) {
+ echo wp_kses(
+ sprintf(
+ // translators: 1 HTML a tag to W3TC settings page Google PageSpeed meta box.
+ __(
+ 'Before you can get started using the Google PageSpeed tool, you’ll first need to authorize access. Please click %1$s.',
+ 'w3-total-cache'
+ ),
+ '' . esc_html__( 'here', 'w3-total-cache' ) . ' '
+ ),
+ array(
+ 'a' => array(
+ 'href' => array(),
+ 'target' => array(),
+ ),
+ )
+ );
+ return;
+ }
+
include W3TC_DIR . '/PageSpeed_Widget_View.php';
}
@@ -174,7 +194,7 @@ class PageSpeed_Widget {
} else {
$api_response['time'] = time();
$api_response['display_time'] = \current_time( 'M jS, Y g:ia', false );
- update_option( 'w3tc_pagespeed_data_' . $home_url, wp_json_encode( $api_response ), 'yes' );
+ update_option( 'w3tc_pagespeed_data_' . $home_url, wp_json_encode( $api_response ), 'no' );
}
}
diff --git a/wp-content/plugins/w3-total-cache/PageSpeed_Widget_View.css b/wp-content/plugins/w3-total-cache/PageSpeed_Widget_View.css
index e9b5c14f..0ccc5e5d 100644
--- a/wp-content/plugins/w3-total-cache/PageSpeed_Widget_View.css
+++ b/wp-content/plugins/w3-total-cache/PageSpeed_Widget_View.css
@@ -4,7 +4,7 @@
.w3tcps_loading .spinner {
margin-top: 5px;
- float: left;
+ float: unset;
}
.w3tcps_timestamp_container {
@@ -33,13 +33,23 @@
margin: 5px !important;
}
+.w3tcps_widget_metrics {
+ display: flex;
+ flex-wrap: wrap;
+}
+
+.w3tcps_metric {
+ flex-grow: 1;
+ width: 33%;
+}
+
.w3tcps_metric_title {
font-size: 14px;
}
.w3tcps_metric_title,
.w3tcps_metric_stats {
- padding: 8px 12px;
+ padding: 8px 5px;
margin: 0;
text-align: left;
}
@@ -142,3 +152,19 @@
width:100%;
text-align: center;
}
+
+@media only screen and (max-width: 1200px) {
+ .w3tcps_metric {
+ width: 50%;
+ }
+}
+
+@media only screen and (max-width: 782px) {
+ .w3tcps_metric {
+ width: 50%;
+ }
+
+ .w3tcps_metric > * {
+ text-align: center;
+ }
+}
\ No newline at end of file
diff --git a/wp-content/plugins/w3-total-cache/PageSpeed_Widget_View.js b/wp-content/plugins/w3-total-cache/PageSpeed_Widget_View.js
index a1fda7a7..d7f4e1dd 100644
--- a/wp-content/plugins/w3-total-cache/PageSpeed_Widget_View.js
+++ b/wp-content/plugins/w3-total-cache/PageSpeed_Widget_View.js
@@ -42,7 +42,6 @@ jQuery(document).ready(function ($) {
$('.w3tcps_buttons').removeClass('w3tc_none');
$('.w3tc-gps-widget').html(data.w3tcps_widget);
$('.w3tc-gps-widget').removeClass('w3tc_none').fadeIn('slow');
- $('#normal-sortables').masonry();
}
).fail(function (jqXHR, textStatus, errorThrown) {
$('.w3tcps_error').html(w3tcData.lang.pagespeed_widget_data_error + jqXHR.responseText);
diff --git a/wp-content/plugins/w3-total-cache/PageSpeed_Widget_View_FromApi.php b/wp-content/plugins/w3-total-cache/PageSpeed_Widget_View_FromApi.php
index 08673bf2..0c083ccb 100644
--- a/wp-content/plugins/w3-total-cache/PageSpeed_Widget_View_FromApi.php
+++ b/wp-content/plugins/w3-total-cache/PageSpeed_Widget_View_FromApi.php
@@ -75,12 +75,12 @@ if ( ! defined( 'W3TC' ) ) {
get_boolean( 'widget.pagespeed.enabled' ) ) {
- $plugins[] = new PageSpeed_Widget();
- }
+ $plugins[] = new PageSpeed_Widget();
$plugins[] = new Generic_Plugin_AdminCompatibility();
$plugins[] = new Licensing_Plugin_Admin();
diff --git a/wp-content/plugins/w3-total-cache/UsageStatistics_Page.php b/wp-content/plugins/w3-total-cache/UsageStatistics_Page.php
index 49bb0195..ab51bb6d 100644
--- a/wp-content/plugins/w3-total-cache/UsageStatistics_Page.php
+++ b/wp-content/plugins/w3-total-cache/UsageStatistics_Page.php
@@ -159,7 +159,7 @@ class UsageStatistics_Page {
public function summary_item( $id, $name, $checked = false, $extra_class = '', $column_background = '', $link_key = '' ) {
- echo '