'pgcache.configuration_overloaded' ) );
?>
'
);
?>
'minify.configuration_overloaded' ) );
?>
' . __( 'CSS', 'w3-total-cache' ) . '',
'' . __( 'JS', 'w3-total-cache' ) . '',
'' . __( 'HTML', 'w3-total-cache' ) . ''
)
);
?>
'
);
?>
'dbcache.configuration_overloaded' ) );
?>
'
);
?>
'objectcache.configuration_overloaded' ) );
?>
'
);
?>
'browsercache.configuration_overloaded' ) );
?>
'varnish.configuration_overloaded' ) );
?>
',
'',
'',
''
),
array(
'a' => array(
'href' => array(),
),
)
);
?>
'
);
?>
_config->get_string( 'widget.pagespeed.access_token' ) ) ? $this->_config->get_string( 'widget.pagespeed.access_token' ) : '' );
$w3_pagespeed = new PageSpeed_Api( $access_token_json );
$site_id = Util_Http::generate_site_id();
$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' ) : '';
$auth_url = $w3_pagespeed->client->createAuthUrl();
$new_gacode = Util_Request::get( 'w3tc_new_gacode' );
$new_w3tc_pagespeed_key = Util_Request::get( 'w3tc_new_w3tc_pagespeed_key' );
$authorize_error = Util_Request::get( 'w3tc_authorize_error' );
$deauthorize = Util_Request::get( 'w3tc_deauthorize' );
if ( ! empty( $new_gacode ) && ! empty( $new_w3tc_pagespeed_key ) ) {
$response = json_decode( $w3_pagespeed->process_authorization_response( $new_gacode, $new_w3tc_pagespeed_key ), true );
if ( isset( $response['error']['code'] ) && 200 !== $response['error']['code'] ) {
$response_error = sprintf(
// translators: 1 Request response code, 2 Error message.
__(
'Response Code: %1$s
Response Message: %2$s',
'w3-total-cache'
),
! empty( $response['error']['code'] ) ? $response['error']['code'] : 'N/A',
! empty( $response['error']['message'] ) ? $response['error']['message'] : 'N/A'
);
update_option(
'w3tcps_authorize_fail',
__( 'Google PageSpeed Insights API authorization failed.', 'w3-total-cache' )
);
update_option(
'w3tcps_authorize_fail_message',
$response_error
);
} elseif ( ! empty( $response['refresh_token'] ) ) {
update_option(
'w3tcps_authorize_success',
__( 'Google PageSpeed Insights API authorization successfull.', 'w3-total-cache' )
);
} else {
update_option(
'w3tcps_authorize_fail',
__( 'Google PageSpeed Insights API authorization failed.', 'w3-total-cache' )
);
update_option(
'w3tcps_authorize_fail_message',
__( 'Missing refresh token.', 'w3-totoal-cache' )
);
}
wp_safe_redirect( $return_url );
exit;
} elseif ( $deauthorize ) {
$w3_pagespeed->reset();
update_option(
'w3tcps_authorize_success',
__( 'Google PageSpeed Insights API authorization successfully reset.', 'w3-total-cache' )
);
wp_safe_redirect( $return_url );
exit;
} elseif ( ! empty( $authorize_error ) ) {
$authorize_error = json_decode( $authorize_error );
if ( 'authorize-in-missing-site-id' === $authorize_error->error->id ) {
$message = __( 'Unique site ID missing for authorize request!', 'w3-total-cache' );
} elseif ( 'authorize-in-missing-auth-url' === $authorize_error->error->id ) {
$message = __( 'Authorize URL missing for authorize request!', 'w3-total-cache' );
} elseif ( 'authorize-in-missing-return-url' === $authorize_error->error->id ) {
$message = __( 'Return URL missing for authorize request!', 'w3-total-cache' );
} elseif ( 'authorize-in-failed' === $authorize_error->error->id ) {
$message = __( 'Failed to process authorize request!', 'w3-total-cache' );
}
if ( 'authorize-out-code-missing' === $authorize_error->error->id ) {
$message = __( 'No authorize code returned to W3-API from Google!', 'w3-total-cache' );
} elseif ( 'authorize-out-w3tc-pagespeed-key-missing' === $authorize_error->error->id ) {
$message = __( 'No W3Key return to W3-API from Google!', 'w3-total-cache' );
} elseif ( 'authorize-out-not-found' === $authorize_error->error->id ) {
$message = __( 'No W3-API matching record found during Google authorization return processing!', 'w3-total-cache' );
}
update_option(
'w3tcps_authorize_fail',
__( 'Google PageSpeed Insights API authorization failed.', 'w3-total-cache' )
);
update_option(
'w3tcps_authorize_fail_message',
$message
);
wp_safe_redirect( $return_url );
exit;
}
?>
',
''
),
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' ) . ')'
);
?>
|