' . esc_html( $simplify['consent_text'] ) . '';
}
?>
'aieo-simplify-waiting' ) );
ob_start();
$aieo_ov_withdraw();
$aieo_ov_footer .= (string) ob_get_clean();
$aieo_simplify_js = <<<'JS'
(function () {
var el = document.getElementById('aieo-simplify-waiting');
if (!el || typeof ajaxurl === 'undefined') { return; }
var nonce = el.getAttribute('data-nonce');
var tries = 0;
function poll() {
tries++;
if (tries > 30) { return; }
var body = new URLSearchParams({ action: 'aieo_simplify_poll', nonce: nonce });
fetch(ajaxurl, { method: 'POST', credentials: 'same-origin', body: body })
.then(function (r) { return r.json(); })
.then(function (j) {
if (j && j.success && j.data && (j.data.state === 'verdict' || j.data.state === 'error')) {
window.location.reload();
return;
}
window.setTimeout(poll, 20000);
})
.catch(function () { window.setTimeout(poll, 30000); });
}
window.setTimeout(poll, 4000);
})();
JS;
?>
__( 'Rooster Systems could not find the account this site belongs to. Open Set Up and check the connection, then scan again.', 'ai-eshop-optimizer' ),
'site_not_registered' => __( 'Rooster Systems does not know this site under your account yet. Open Set Up, confirm the connection, then scan again.', 'ai-eshop-optimizer' ),
'payload_too_large' => __( 'The plugin list was too large to send. Scan again; only the first five hundred plugins are sent.', 'ai-eshop-optimizer' ),
'site_unverified' => __( 'Rooster Systems could not reach this site to confirm it is yours, so the scan is on hold here. The check needs the site to answer on the public internet, on port 80 or 443, with no password in front of it. Once it does, scan again.', 'ai-eshop-optimizer' ),
);
$aieo_err_text = isset( $aieo_err[ $simplify['error'] ] ) ? $aieo_err[ $simplify['error'] ] : sprintf( __( 'Rooster Systems did not accept the scan (%s). Scan again later.', 'ai-eshop-optimizer' ), $simplify['error'] );
if ( ! empty( $simplify['error_detail'] ) ) {
$aieo_err_text .= ' ' . sprintf( __( 'Reason given: %s.', 'ai-eshop-optimizer' ), $simplify['error_detail'] );
}
$aieo_ov_notice( esc_html( $aieo_err_text ), 'warning' );
ob_start();
$aieo_ov_rescan();
$aieo_ov_withdraw();
$aieo_ov_footer .= (string) ob_get_clean();
?>
'overlaps-simplify-your-site',
'icon' => 'sparkles',
'title' => __( 'Simplify your site', 'ai-eshop-optimizer' ),
'description' => __( 'Some of your plugins do jobs Rooster One also does. Find out which, and what running both costs you.', 'ai-eshop-optimizer' ),
'class' => 'aieo-simplify',
'footer' => $aieo_ov_footer,
'col' => 1,
'level' => $aieo_ov_level,
) );
echo $aieo_ov_open . $aieo_ov_body . $aieo_ov_close;
?>
true ) );
?>
true ) ); ?>
true ) );
?>