' . 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 );
};
?>
'pgcache.configuration_overloaded' ) );
?>
'minify.configuration_overloaded' ) );
?>
'dbcache.configuration_overloaded' ) );
?>
'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' ) . '
' : '' );
?>
'browsercache.configuration_overloaded' ) );
?>
',
''
),
array(
'a' => array(
'href' => array(),
'target' => array(),
),
)
),
'',
'allcache_wp_cron'
);
?>
'varnish.configuration_overloaded' ) );
?>
',
''
),
array(
'acronym' => array(
'title' => array(),
),
)
),
'',
'debug'
);
?>
_config->is_extension_active( 'imageservice' )
? Util_UI::admin_url( 'upload.php?page=w3tc_extension_page_imageservice' )
: ''
);
?>
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;
}
?>