updated plugin W3 Total Cache version 2.5.0

This commit is contained in:
2023-10-22 22:21:26 +00:00
committed by Gitium
parent 2f6b5b6047
commit 9e3fa792d7
255 changed files with 10113 additions and 23010 deletions
wp-content/plugins/w3-total-cache
BrowserCache_Environment_Nginx.phpBrowserCache_Page_View_SectionSecurity.phpBrowserCache_Plugin.phpCacheFlush.phpCacheFlush_Locally.phpCacheGroups_Plugin_Admin.phpCacheGroups_Plugin_Admin_View.jsCacheGroups_Plugin_Admin_View.phpCache_File_Generic.phpCdn_AdminActions.phpCdn_GeneralPage_View.phpCdn_Highwinds_Widget_View.phpCdn_Highwinds_Widget_View_NotConfigured.phpCdn_Plugin.phpCdn_StackPath2_Page_View.phpCdn_StackPath2_Widget_View_Authorized.phpCdn_StackPath2_Widget_View_Unauthorized.phpCdn_StackPath_Page_View.phpCdn_StackPath_Widget_View_Authorized.phpCdn_StackPath_Widget_View_Unauthorized.phpCdnfsd_CloudFront_Page_View.phpCdnfsd_GeneralPage_View.phpCdnfsd_LimeLight_Page_View.phpCdnfsd_StackPath2_Page_View.phpCdnfsd_StackPath_Page_View.phpCdnfsd_TransparentCDN_Page_View.phpConfigCompiler.phpConfigKeys.phpDbCache_Environment.phpDbCache_Page.phpDbCache_Plugin.phpDbCache_Wpdb.phpDbCache_WpdbNew.phpDispatcher.phpExtension_Amp_Page_View.phpExtension_CloudFlare_Cdn_Page_View.phpExtension_CloudFlare_GeneralPage_View.phpExtension_CloudFlare_Page_View.phpExtension_CloudFlare_Plugin_Admin.phpExtension_FragmentCache_GeneralPage_View.phpExtension_FragmentCache_Page_View.phpExtension_FragmentCache_Plugin.phpExtension_FragmentCache_Plugin_Admin.phpExtension_Genesis_Page_View.phpExtension_ImageService_Page_View.phpExtension_ImageService_Plugin_Admin.phpExtension_NewRelic_GeneralPage_View.phpExtension_NewRelic_Page_View_Apm.phpExtension_Swarmify_Page_View.phpExtension_Wpml_Plugin_Admin.phpExtensions_Plugin_Admin.phpFeatureShowcase_Plugin_Admin.phpFeatureShowcase_Plugin_Admin_View.phpGeneric_AdminActions_Default.phpGeneric_AdminActions_Flush.phpGeneric_Page_Dashboard_View.cssGeneric_Plugin.phpGeneric_Plugin_Admin.phpGeneric_WidgetCommunity_View.phpGeneric_WidgetServices.phpGeneric_WidgetServices_View.phpLicensing_Plugin_Admin.phpMinify_Plugin.phpMinify_Plugin_Admin.phpMobile_Base.phpObjectCache_Environment.phpObjectCache_Page.phpObjectCache_Plugin.phpObjectCache_Plugin_Admin.phpObjectCache_WpObjectCache.phpObjectCache_WpObjectCache_Regular.phpPageSpeed_Api.phpPageSpeed_Instructions.phpPageSpeed_Page.phpPageSpeed_Page_View.cssPageSpeed_Page_View.jsPageSpeed_Widget.phpPgCache_ContentGrabber.phpPgCache_Plugin.phpRoot_AdminMenu.phpRoot_Loader.phpSetupGuide_Plugin_Admin.phpSupport_Page.phpSupport_Page_View_DoneContent.phpSystemOpCache_GeneralPage_View.phpUsageStatistics_GeneralPage_View.phpUsageStatistics_Page.phpUsageStatistics_Page_View_Free.phpUsageStatistics_Widget_View_Disabled.phpUserExperience_DeferScripts_Extension.phpUserExperience_DeferScripts_Mutator.phpUserExperience_DeferScripts_Page_View.phpUserExperience_DeferScripts_Script.jsUserExperience_GeneralPage_View.phpUserExperience_LazyLoad_Page_View.phpUserExperience_Page_View.phpUserExperience_Plugin_Admin.phpUtil_Admin.phpUtil_AttachToActions.phpUtil_Environment.phpUtil_PageSpeed.phpUtil_PageUrls.phpUtil_Ui.phpVarnish_Plugin.php
extension-example
inc
languages
pub
readme.txt
vendor
autoload.php
composer
guzzlehttp
guzzle
psr7
w3-total-cache-api.phpw3-total-cache.php
wp-content

@ -0,0 +1,218 @@
<?php
/**
* File: top_nav_bar.php
*
* @package W3TC
*/
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
$config = Dispatcher::config();
$menu_array = array(
'settings' => array(
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_general' ),
'text' => __( 'General Settings', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_pgcache' ),
'text' => __( 'Page Cache', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_minify' ),
'text' => __( 'Minify', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_dbcache' ),
'text' => __( 'Database Cache', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_objectcache' ),
'text' => __( 'Object Cache', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_browsercache' ),
'text' => __( 'Browser Cache', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_cachegroups' ),
'text' => __( 'Cache Groups', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_cdn' ),
'text' => 'CDN',
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_fragmentcache' ),
'text' => __( 'Fragment Cache', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_userexperience' ),
'text' => __( 'User Experience', 'w3-total-cache' ),
),
),
'tools' => array(
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_extensions' ),
'text' => __( 'Extensions', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_stats' ),
'text' => __( 'Statistics', 'w3-total-cache' ),
),
array(
'url' => $config->is_extension_active( 'imageservice' )
? Util_Ui::admin_url( 'upload.php?page=w3tc_extension_page_imageservice' )
: Util_Ui::admin_url( 'admin.php?page=w3tc_general#image_service' ),
'text' => __( 'WebP Converter', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_pagespeed' ),
'text' => __( 'Google PageSpeed', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_setup_guide' ),
'text' => __( 'Setup Guide', 'w3-total-cache' ),
),
),
'info' => array(
array(
'url' => Util_UI::admin_url( 'admin.php?page=w3tc_about' ),
'text' => __( 'About', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_feature_showcase' ),
'text' => __( 'Feature Showcase', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_install' ),
'text' => __( 'Install', 'w3-total-cache' ),
),
array(
'url' => '#',
'text' => __( 'Compatibility Test', 'w3-total-cache' ),
'class' => 'compatiblity-test button-self-test',
),
array(
'url' => 'https://api.w3-edge.com/v1/redirects/faq',
'text' => 'FAQ',
'target' => '_blank',
'dashicon' => '<span class="dashicons dashicons-external"></span>',
),
),
);
do_action( 'w3tc_dashboard_top_nav_bar' );
?>
<div id="w3tc-top-nav-bar">
<div id="w3tc-top-nav-bar-content">
<a class="logo-link" href="<?php echo esc_url( Util_UI::admin_url( 'admin.php?page=w3tc_dashboard' ) ); ?>" alt="W3 Total Cache">
<h2 class="logo">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML span tag, 2 opening HTML sup tag, 3 closing HTML sup tag, 4 closing HTML span tag.
__(
'W3 Total Cache %1$sby W3 EDGE %2$s&reg;%3$s%4$s',
'w3-total-cache'
),
'<span>',
'<sup>',
'</sup>',
'</span>'
),
array(
'span' => array(),
'sup' => array(),
)
);
?>
</h2>
</a>
<div id="w3tc-top-nav-bar-content-links">
<a class="w3tc-top-nav-support" href="<?php echo esc_url( Util_UI::admin_url( 'admin.php?page=w3tc_dashboard' ) ); ?>" alt="<?php esc_attr_e( 'Dashboard', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Dashboard', 'w3-total-cache' ); ?>
</a>
<div class="w3tc-top-nav-dropdown">
<a class="w3tc-top-nav-settings no-link" href="#" alt="<?php esc_attr_e( 'Settings', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Settings', 'w3-total-cache' ); ?><span class="dashicons dashicons-arrow-down-alt2"></span>
</a>
<div id="w3tc-top-nav-settings-menu" class="w3tc-top-nav-dropdown-content">
<?php
foreach ( $menu_array['settings'] as $entry ) {
$output = sprintf(
// translators: 1 link class, 2 link href URL , 3 link alt text, 4 link target, 5 link text, 6 link text dashicon.
'<a %1$s href="%2$s" alt="%3$s"%4$s>%5$s%6$s</a>',
! empty( $entry['class'] ) ? ' class="' . esc_attr( $entry['class'] ) . '" ': '',
esc_url( $entry['url'] ),
esc_attr( $entry['text'] ),
( ! empty( $entry['target'] ) ? ' target="' . esc_attr( $entry['target'] ) . '"' : '' ),
esc_html( $entry['text'] ),
( ! empty( $entry['dashicon'] ) ? $entry['dashicon'] : '' )
);
echo wp_kses( $output, Util_Ui::get_allowed_html_for_wp_kses_from_content( $output ) );
}
?>
</div>
</div>
<div class="w3tc-top-nav-dropdown">
<a class="w3tc-top-nav-tools no-link" href="#" alt="<?php esc_attr_e( 'Tools', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Tools', 'w3-total-cache' ); ?><span class="dashicons dashicons-arrow-down-alt2"></span>
</a>
<div id="w3tc-top-nav-tools-menu" class="w3tc-top-nav-dropdown-content">
<?php
foreach ( $menu_array['tools'] as $entry ) {
$output = sprintf(
// translators: 1 link class, 2 link href URL , 3 link alt text, 4 link target, 5 link text, 6 link text dashicon.
'<a %1$s href="%2$s" alt="%3$s"%4$s>%5$s%6$s</a>',
! empty( $entry['class'] ) ? ' class="' . esc_attr( $entry['class'] ) . '" ': '',
esc_url( $entry['url'] ),
esc_attr( $entry['text'] ),
( ! empty( $entry['target'] ) ? ' target="' . esc_attr( $entry['target'] ) . '"' : '' ),
esc_html( $entry['text'] ),
( ! empty( $entry['dashicon'] ) ? $entry['dashicon'] : '' )
);
echo wp_kses( $output, Util_Ui::get_allowed_html_for_wp_kses_from_content( $output ) );
}
?>
</div>
</div>
<div class="w3tc-top-nav-dropdown">
<a class="w3tc-top-nav-info no-link" href="#" alt="<?php esc_attr_e( 'Info', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Info', 'w3-total-cache' ); ?><span class="dashicons dashicons-arrow-down-alt2"></span>
</a>
<div id="w3tc-top-nav-info-menu" class="w3tc-top-nav-dropdown-content">
<?php
foreach ( $menu_array['info'] as $entry ) {
$output = sprintf(
// translators: 1 link class, 2 link href URL , 3 link alt text, 4 link target, 5 link text, 6 link text dashicon.
'<a %1$s href="%2$s" alt="%3$s"%4$s>%5$s%6$s</a>',
! empty( $entry['class'] ) ? ' class="' . esc_attr( $entry['class'] ) . '" ': '',
esc_url( $entry['url'] ),
esc_attr( $entry['text'] ),
( ! empty( $entry['target'] ) ? ' target="' . esc_attr( $entry['target'] ) . '"' : '' ),
esc_html( $entry['text'] ),
( ! empty( $entry['dashicon'] ) ? $entry['dashicon'] : '' )
);
echo wp_kses( $output, Util_Ui::get_allowed_html_for_wp_kses_from_content( $output ) );
}
?>
</div>
</div>
<a class="w3tc-top-nav-support" href="<?php echo esc_url( Util_UI::admin_url( 'admin.php?page=w3tc_support' ) ); ?>" alt="<?php esc_attr_e( 'Support', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Support', 'w3-total-cache' ); ?>
</a>
<?php
if ( ! Util_Environment::is_w3tc_pro( $config ) ) {
echo '<input type="button" class="button-primary button-buy-plugin {nonce: \'' . esc_attr( wp_create_nonce( 'w3tc' ) ) . '\'}"
data-src="top_nav_bar" value="' . esc_html__( 'Upgrade', 'w3-total-cache' ) . '" />';
}
?>
</div>
</div>
</div>