' . esc_html__( 'Learn more', 'w3-total-cache' ) . ''; }; $w3tc_minify_anchor_allowed_tags = array( 'a' => array( 'class' => array(), 'href' => array(), 'title' => array(), 'target' => array(), ), 'span' => array( 'class' => array(), ), ); $w3tc_minify_learn_more_output = static function ( $anchor, $setting_label ) use ( $w3tc_minify_learn_more_link, $w3tc_minify_anchor_allowed_tags ) { $link = $w3tc_minify_learn_more_link( $anchor, $setting_label ); if ( empty( $link ) ) { return ''; } return wp_kses( $link, $w3tc_minify_anchor_allowed_tags ); }; ?>
_config->is_preview() ) : ?> array() ) ); ?> /> _page ), 'w3tc_config_preview_deploy' ) ) ), array( 'input' => array( 'type' => array(), 'name' => array(), 'class' => array(), 'value' => array(), 'onclick' => array(), ), ) ); ?>

array( 'type' => array(), 'name' => array(), 'class' => array(), 'value' => array(), 'onclick' => array(), ), ) ); ?>

array() ) ); ?> />

'pgcache.configuration_overloaded' ) ); ?> 'pgcache.enabled', 'control' => 'checkbox', 'checkbox_label' => esc_html__( 'Enable', 'w3-total-cache' ), 'description' => esc_html__( 'Caching pages will reduce the response time of your site and increase the scale of your web server.', 'w3-total-cache' ), ) ); Util_Ui::config_item( array( 'key' => 'pgcache.engine', 'control' => 'selectbox', 'selectbox_values' => array( 'file' => array( 'label' => esc_html__( 'Disk: Basic', 'w3-total-cache' ), 'optgroup' => 0, ), 'file_generic' => array( 'label' => esc_html__( 'Disk: Enhanced', 'w3-total-cache' ), 'optgroup' => 0, ), 'apc' => array( 'disabled' => ! Util_Installed::apc(), 'label' => esc_html__( 'Opcode: Alternative PHP Cache (APC / APCu)', 'w3-total-cache' ), 'optgroup' => 1, ), 'eaccelerator' => array( 'disabled' => ! Util_Installed::eaccelerator(), 'label' => esc_html__( 'Opcode: eAccelerator', 'w3-total-cache' ), 'optgroup' => 1, ), 'xcache' => array( 'disabled' => ! Util_Installed::xcache(), 'label' => esc_html__( 'Opcode: XCache', 'w3-total-cache' ), 'optgroup' => 1, ), 'wincache' => array( 'disabled' => ! Util_Installed::wincache(), 'label' => esc_html__( 'Opcode: WinCache', 'w3-total-cache' ), 'optgroup' => 1, ), 'memcached' => array( 'disabled' => ! Util_Installed::memcached(), 'label' => esc_html__( 'Memcached', 'w3-total-cache' ), 'optgroup' => 2, ), 'nginx_memcached' => array( 'disabled' => ! Util_Installed::memcached_memcached() || ! $w3tc_is_pro, 'label' => esc_html__( 'Nginx + Memcached', 'w3-total-cache' ) . ( $w3tc_is_pro ? '' : esc_html__( ' (available after upgrade)', 'w3-total-cache' ) ), 'optgroup' => 2, ), 'redis' => array( 'disabled' => ! Util_Installed::redis(), 'label' => esc_html__( 'Redis', 'w3-total-cache' ), 'optgroup' => 2, ), ), 'selectbox_optgroups' => array( esc_html__( 'Shared Server (disk enhanced is best):', 'w3-total-cache' ), esc_html__( 'Dedicated / Virtual Server:', 'w3-total-cache' ), esc_html__( 'Multiple Servers:', 'w3-total-cache' ), ), ) ); ?>
'minify.configuration_overloaded' ) ); ?> 'minify.enabled', 'control' => 'checkbox', 'checkbox_label' => esc_html__( 'Enable', 'w3-total-cache' ), 'description' => wp_kses( sprintf( // translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag, // translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag, // translators: 5 opening HTML acronym tag, 6 closing HTML acronym tag. __( 'Minification can decrease file size of %1$sHTML%2$s, %3$sCSS%4$s, %5$sJS%6$s and feeds respectively by ~10%% on average.', 'w3-total-cache' ), '', '', '', '', '', '' ), array( 'acronym' => array( 'title' => array(), ), ) ) . $w3tc_minify_learn_more_output( 'general-settings', __( 'Minify', 'w3-total-cache' ) ), ) ); Util_Ui::config_item( array( 'key' => 'minify.auto', 'value' => ( $this->_config->get_boolean( 'minify.auto' ) ? 1 : 0 ), 'control' => 'radiogroup', 'radiogroup_values' => array( '1' => esc_html__( 'Auto', 'w3-total-cache' ), '0' => esc_html__( 'Manual', 'w3-total-cache' ), ), 'description' => esc_html__( 'Select manual mode to use fields on the Minify settings tab to specify files to be minified, otherwise files will be minified automatically.', 'w3-total-cache' ), 'control_after' => ' ' . esc_html__( 'Learn more', 'w3-total-cache' ) . '', ) ); Util_Ui::config_item_engine( array( 'key' => 'minify.engine', 'control_after' => ' ' . esc_html__( 'Learn more', 'w3-total-cache' ) . '', ) ); Util_Ui::config_item( array( 'key' => 'minify.html.engine', 'control' => 'selectbox', 'selectbox_values' => array( 'html' => esc_html__( 'Minify (default)', 'w3-total-cache' ), 'htmltidy' => array( 'disabled' => ! Util_Installed::tidy(), 'label' => esc_html__( 'HTML Tidy', 'w3-total-cache' ), ), ), 'control_after' => ' ' . esc_html__( 'Learn more', 'w3-total-cache' ) . '', ) ); Util_Ui::config_item( array( 'key' => 'minify.js.engine', 'control' => 'selectbox', 'selectbox_values' => array( 'js' => esc_html__( 'JSMin (default)', 'w3-total-cache' ), 'googleccjs' => esc_html__( 'Google Closure Compiler (Web Service)', 'w3-total-cache' ), 'ccjs' => esc_html__( 'Google Closure Compiler (Local Java)', 'w3-total-cache' ), 'jsminplus' => esc_html__( 'Narcissus', 'w3-total-cache' ), 'yuijs' => esc_html__( 'YUI Compressor', 'w3-total-cache' ), ), ) ); Util_Ui::config_item( array( 'key' => 'minify.css.engine', 'control' => 'selectbox', 'selectbox_values' => array( 'css' => esc_html__( 'Minify (default)', 'w3-total-cache' ), 'csstidy' => array( 'label' => esc_html__( 'CSS Tidy', 'w3-total-cache' ), 'disabled' => ( version_compare( PHP_VERSION, '5.4.0', '<' ) ? true : false ), ), 'cssmin' => esc_html__( 'YUI Compressor (PHP)', 'w3-total-cache' ), 'yuicss' => esc_html__( 'YUI Compressor', 'w3-total-cache' ), ), ) ); ?>
'dbcache.configuration_overloaded' ) ); ?> 'dbcache.enabled', 'control' => 'checkbox', 'checkbox_label' => esc_html__( 'Enable', 'w3-total-cache' ), 'description' => esc_html__( 'Caching database objects decreases the response time of your site. Best used if object caching is not possible.', 'w3-total-cache' ), ) ); ?> 'dbcache.engine' ) ); ?>
'objectcache.configuration_overloaded' ) ); echo ( ! $this->_config->getf_boolean( 'objectcache.enabled' ) && has_filter( 'w3tc_config_item_objectcache.enabled' ) ? '

' . esc_html__( 'Object Cache is disabled via filter.', 'w3-total-cache' ) . '

' : '' ); ?> 'objectcache.enabled', 'control' => 'checkbox', 'checkbox_label' => esc_html__( 'Enable', 'w3-total-cache' ), 'description' => wp_kses( sprintf( // translators: 1 opening HTML a tag to WordPress codex for WP Object Cache, 2 Opening HTML acronym tag, // translators: 3 closing HTML acronym tag, 4 closing HTML a tag. __( 'Object caching greatly increases performance for highly dynamic sites that use the %1$sObject Cache %2$sAPI%3$s%4$s.', 'w3-total-cache' ), '', '', '', '' ), array( 'acronym' => array( 'title' => array(), ), 'a' => array( 'href' => array(), 'target' => array(), ), ) ), ); if ( ! $this->_config->getf_boolean( 'objectcache.enabled' ) && has_filter( 'w3tc_config_item_objectcache.enabled' ) ) { $w3tc_objectcache_config_item['disabled'] = true; } Util_Ui::config_item( $w3tc_objectcache_config_item ); ?> 'objectcache.engine' ) ); ?>
'browsercache.configuration_overloaded' ) ); ?> 'browsercache.enabled', 'control' => 'checkbox', 'checkbox_label' => esc_html__( 'Enable', 'w3-total-cache' ), 'description' => wp_kses( sprintf( // translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag. __( 'Enable %1$sHTTP%2$s compression and add headers to reduce server load and decrease file load time.', 'w3-total-cache' ), '', '' ), array( 'acronym' => array( 'title' => array(), ), ) ), ) ); ?>
', '' ), array( 'a' => array( 'href' => array(), 'target' => array(), ), ) ), '', 'allcache_wp_cron' ); ?> get_boolean( 'allcache.wp_cron' ); Util_Ui::config_item( array( 'key' => 'allcache.wp_cron', 'label' => esc_html__( 'Enable WP-Cron Event', 'w3-total-cache' ), 'checkbox_label' => esc_html__( 'Enable', 'w3-total-cache' ), 'control' => 'checkbox', ) ); $w3tc_time_options = array(); for ( $w3tc_hour = 0; $w3tc_hour < 24; $w3tc_hour++ ) { foreach ( array( '00', '30' ) as $w3tc_minute ) { $w3tc_time_value = $w3tc_hour * 60 + intval( $w3tc_minute ); $w3tc_scheduled_time = new \DateTime( "{$w3tc_hour}:{$w3tc_minute}", wp_timezone() ); $w3tc_time_label = $w3tc_scheduled_time->format( 'g:i a' ); $w3tc_time_options[ $w3tc_time_value ] = $w3tc_time_label; } } Util_Ui::config_item( array( 'key' => 'allcache.wp_cron_time', 'label' => esc_html__( 'Start Time', 'w3-total-cache' ), 'control' => 'selectbox', 'selectbox_values' => $w3tc_time_options, 'description' => esc_html__( 'This setting controls the initial start time of the cron job. If the selected time has already passed, it will schedule the job for the following day at the selected time.', 'w3-total-cache' ), 'disabled' => $w3tc_wp_disabled, ) ); Util_Ui::config_item( array( 'key' => 'allcache.wp_cron_interval', 'label' => esc_html__( 'Interval', 'w3-total-cache' ), 'control' => 'selectbox', 'selectbox_values' => array( 'hourly' => esc_html__( 'Hourly', 'w3-total-cache' ), 'twicedaily' => esc_html__( 'Twice Daily', 'w3-total-cache' ), 'daily' => esc_html__( 'Daily', 'w3-total-cache' ), 'weekly' => esc_html__( 'Weekly', 'w3-total-cache' ), ), 'description' => esc_html__( 'This setting controls the interval that the cron job should occur.', 'w3-total-cache' ), 'disabled' => $w3tc_wp_disabled, ) ); ?>
'varnish.configuration_overloaded' ) ); ?> 'common.trusted_proxies', 'control' => 'textarea', 'description' => esc_html__( 'IP addresses or CIDR ranges of reverse proxies and load balancers in front of this site (one per line). Forwarded scheme and client-IP headers are used only for these addresses. Leave empty when PHP receives client connections directly. Developers may also supply this list via the w3tc_trusted_proxies filter.', 'w3-total-cache' ), ) ); ?>
checkbox( 'varnish.enabled' ); ?>

', '', '', '' ), array( 'acronym' => array( 'title' => array(), ), ) ); ?>


', '' ), array( 'acronym' => array( 'title' => array(), ), ) ); ?>

'cluster_messagebus_sns_api_key', 'name' => 'cluster__messagebus__sns__api_key', 'has_value' => '' !== $this->_config->get_string( 'cluster.messagebus.sns.api_key' ), 'size' => 60, 'type' => 'text', ) ); ?>

', '' ), array( 'acronym' => array( 'title' => array(), ), ) ); ?>

'cluster_messagebus_sns_api_secret', 'name' => 'cluster__messagebus__sns__api_secret', 'has_value' => '' !== $this->_config->get_string( 'cluster.messagebus.sns.api_secret' ), 'size' => 60, ) ); ?>

', '' ), array( 'acronym' => array( 'title' => array(), ), ) ); ?>

', '' ), array( 'acronym' => array( 'title' => array(), ), ) ); ?>

'plugin_license_key', 'name' => 'plugin__license_key', 'has_value' => '' !== $this->_config->get_string( 'plugin.license_key' ), 'size' => 45, 'type' => 'text', ) ); ?>

' . esc_html__( 'upgrading', 'w3-total-cache' ) . '' ), array( 'a' => array( 'class' => array(), 'data-src' => array(), 'href' => array(), ), ) ); ?>

'docroot_fix.enable', 'control' => 'checkbox', 'checkbox_label' => esc_html__( 'Fix document root path', 'w3-total-cache' ), 'label_class' => 'w3tc_single_column', 'description' => sprintf( // translators: 1: WordPress ABSPATH value, 2: Server document root value. esc_html__( 'Fix incorrect server document root path. Uses the WordPress ABSPATH ("%1$s") in place of the current server document root ("%2$s").', 'w3-total-cache' ), esc_attr( untrailingslashit( ABSPATH ) ), esc_attr( ! empty( $_SERVER['DOCUMENT_ROOT'] ) ? esc_url_raw( wp_unslash( $_SERVER['DOCUMENT_ROOT'] ) ) : '' ) ), ) ); Util_Ui::config_item( array( 'key' => 'common.track_usage', 'control' => 'checkbox', 'checkbox_label' => esc_html__( 'Anonymously track usage to improve product quality', 'w3-total-cache' ), 'label_class' => 'w3tc_single_column', ) ); ?>
checkbox( 'common.force_master' ); ?>

/>

/>

', '' ), array( 'a' => array( 'href' => array(), ), ) ); ?>

/>

', '' ), array( 'acronym' => array( 'title' => array(), ), ) ); ?>

/>

', '' ), array( 'acronym' => array( 'title' => array(), ), ) ), '', 'debug' ); ?>
checkbox_debug( 'pgcache.debug' ); ?>
checkbox_debug( 'minify.debug' ); ?>
checkbox_debug( 'dbcache.debug' ); ?>
checkbox_debug( 'objectcache.debug' ); ?>
checkbox_debug( array( 'fragmentcache', 'debug' ) ); ?>
checkbox_debug( 'cdn.debug' ); ?>
checkbox_debug( 'cdnfsd.debug' ); ?>
checkbox_debug( 'varnish.debug' ); ?>
checkbox_debug( 'cluster.messagebus.debug' ); ?>

', '' ), array( 'acronym' => array( 'title' => array(), ), ) ); ?>

checkbox_debug_pro( 'pgcache.debug_purge', __( 'Page Cache Purge Log', 'w3-total-cache' ), ' (' . __( 'view log', 'w3-total-cache' ) . ')' ); ?>
checkbox_debug_pro( 'dbcache.debug_purge', __( 'Database Cache Purge Log', 'w3-total-cache' ), ' (' . __( 'view log', 'w3-total-cache' ) . ')' ); ?>
checkbox_debug_pro( 'objectcache.debug_purge', __( 'Object Cache Purge Log', 'w3-total-cache' ), ' (' . __( 'view log', 'w3-total-cache' ) . ')' ); ?>
_config->is_extension_active( 'imageservice' ) ? Util_UI::admin_url( 'upload.php?page=w3tc_extension_page_imageservice' ) : '' ); ?> _config->is_extension_active( 'imageservice' ) ? sprintf( // Translators: 1 name of plugin, 2 opening HTML a tag, 3 closing HTML a tag. __( 'The tool and its settings can be found on the %1$s %2$sImage Converter%3$s page.', 'w3-total-cache' ), 'Total Cache', '', '' ) : ''; Util_Ui::config_item_pro( array( 'key' => 'extension.imageservice', 'label' => esc_html__( 'Image Converter', 'w3-total-cache' ), 'control' => 'checkbox', 'checkbox_label' => __( 'Enable Image Converter Extension', 'w3-total-cache' ), 'excerpt' => wp_kses( sprintf( // translators: 1 HTML line breaks, 2 license rates for free/pro users, 3 link to image service tool. __( 'This extension allows for optimizing media library images to modern formats like WebP or AVIF.%1$s%2$s%1$s%3$s', 'w3-total-cache' ), '

', Util_Environment::is_w3tc_pro( $this->_config ) ? sprintf( // translators: 1 free hourly rate, 2 free monthly rate, 3 opening HTML a tag to documentation URL, // translators: 4 closing HTML a tag. __( 'As a Pro license holder you are granted conversion rates of %1$s/hour and %2$s/month. Conversion rates are subject to change and documentation can be found %3$shere%4$s.', 'w3-total-cache' ), number_format_i18n( W3TC_IMAGE_SERVICE_PRO_HLIMIT, 0 ), empty( W3TC_IMAGE_SERVICE_PRO_MLIMIT ) ? esc_html__( 'unlimited', 'w3-total-cache' ) : number_format_i18n( W3TC_IMAGE_SERVICE_PRO_MLIMIT, 0 ), '', '' ) : sprintf( // translators: 1 free hourly rate, 2 pro monthly rate, 3 pro hourly rate, 4 pro monthly rate, // translators: 5 opening HTML a tag to documentation URL, 6 closing HTML a tag. __( 'As a free user you are limited to conversions of %1$s/hour and %2$s/month. The Pro license increases these rates to %3$s/hour and %4$s/month. Conversion rates are subject to change and documentation can be found %5$shere%6$s.', 'w3-total-cache' ), number_format_i18n( W3TC_IMAGE_SERVICE_FREE_HLIMIT, 0 ), number_format_i18n( W3TC_IMAGE_SERVICE_FREE_MLIMIT, 0 ), number_format_i18n( W3TC_IMAGE_SERVICE_PRO_HLIMIT, 0 ), empty( W3TC_IMAGE_SERVICE_PRO_MLIMIT ) ? esc_html__( 'unlimited', 'w3-total-cache' ) : number_format_i18n( W3TC_IMAGE_SERVICE_PRO_MLIMIT, 0 ), '', '' ), $w3tc_image_service_link ), array( 'a' => array( 'href' => array(), 'target' => array(), ), 'br' => array(), ) ), 'description' => array(), 'label_class' => 'w3tc_single_column', 'wrap_separate' => true, 'intro_label' => __( 'Potential Google PageSpeed Gain', 'w3-total-cache' ), 'score' => '+9', 'score_label' => __( 'Points', 'w3-total-cache' ), 'score_description' => __( 'In one recent test, converting images to modern formats like WebP added over 9 points to the Google PageSpeed score!', 'w3-total-cache' ), 'score_link' => 'https://www.boldgrid.com/support/w3-total-cache/pagespeed-tests/webp/?utm_source=w3tc&utm_medium=webp&utm_campaign=proof', ) ); ?>
Util_UI::admin_url( 'admin.php?page=w3tc_pagespeed' ) ) ); ?> _config->get_string( 'widget.pagespeed.access_token' ) ) ? $this->_config->get_string( 'widget.pagespeed.access_token' ) : '' ); $w3tc_w3_pagespeed = new PageSpeed_Api( $w3tc_access_token_json ); $w3tc_site_id = Util_Http::generate_site_id(); $w3tc_return_url = Util_Ui::admin_url( 'admin.php?page=w3tc_general' ); $w3tc_pagespeed_key = ! empty( $this->_config->get_string( 'widget.pagespeed.w3tc_pagespeed_key' ) ) ? $this->_config->get_string( 'widget.pagespeed.w3tc_pagespeed_key' ) : ''; $w3tc_access_token = Util_Request::get( 'w3tc_access_token' ); $w3tc_pagespeed_key = Util_Request::get( 'w3tc_pagespeed_key' ); $w3tc_authorize_error = Util_Request::get( 'w3tc_authorize_error' ); $w3tc_deauthorize = Util_Request::get( 'w3tc_deauthorize' ); if ( ! empty( $w3tc_authorize_error ) ) { $w3tc_message = PageSpeed_Api::get_authorize_failure_message( $w3tc_authorize_error ); update_option( 'w3tcps_authorize_fail', __( 'Google PageSpeed Insights API authorization failed.', 'w3-total-cache' ) ); update_option( 'w3tcps_authorize_fail_message', $w3tc_message ); wp_safe_redirect( $w3tc_return_url ); exit; } elseif ( ! empty( $w3tc_access_token ) && ! empty( $w3tc_pagespeed_key ) ) { $w3tc_access_token_prepared = PageSpeed_Api::prepare_access_token_json( $w3tc_access_token ); if ( false === $w3tc_access_token_prepared ) { update_option( 'w3tcps_authorize_fail', __( 'Google PageSpeed Insights API authorization failed.', 'w3-total-cache' ) ); update_option( 'w3tcps_authorize_fail_message', __( 'Google PageSpeed authorization returned an unusable access token.', 'w3-total-cache' ) ); } else { $this->_config->set( 'widget.pagespeed.access_token', $w3tc_access_token_prepared ); $this->_config->set( 'widget.pagespeed.w3tc_pagespeed_key', $w3tc_pagespeed_key ); $this->_config->save(); PageSpeed_Api::clear_failure_notices(); } wp_safe_redirect( $w3tc_return_url ); exit; } elseif ( $w3tc_deauthorize ) { if ( $w3tc_w3_pagespeed->reset() ) { update_option( 'w3tcps_authorize_success', __( 'Google PageSpeed Insights API authorization successfully reset.', 'w3-total-cache' ) ); } wp_safe_redirect( $w3tc_return_url ); exit; } ?> client->getAccessToken() ) ? $w3tc_w3_pagespeed->client->getAccessToken() : '' ); if ( ! $w3tc_w3_pagespeed->client->isAccessTokenExpired() && ! empty( $w3tc_access_token_json ) ) { ?>

array() ) ); ?> />

array() ) ); ?> />

array() ) ); ?> />