false, 'count' => 0, 'fetched_at' => 0, 'refresh_url' => '' ); $aieo_simplify_msg = isset( $_GET['aieo_simplify'] ) ? sanitize_key( wp_unslash( $_GET['aieo_simplify'] ) ) : ''; $aieo_cat_msg = isset( $_GET['aieo_catalogue'] ) ? sanitize_key( wp_unslash( $_GET['aieo_catalogue'] ) ) : ''; $aieo_sub_url = $tab_url( 'subscription' ); $aieo_cap_labels = array(); if ( file_exists( AIEO_DIR . 'includes/dmm/data/capabilities.php' ) ) { foreach ( (array) include AIEO_DIR . 'includes/dmm/data/capabilities.php' as $aieo_cc => $aieo_cd ) { $aieo_cap_labels[ $aieo_cc ] = (string) $aieo_cd['label']; } } if ( ! $aieo_ov_embedded && function_exists( 'rooster_admin_band_open' ) ) { rooster_admin_band_open( array( 'cols' => 2 ) ); } $aieo_ov_tone = static function ( $c ) { if ( ! empty( $c['fault_live'] ) ) { return 'warning'; } if ( AIEO_Overlap::STATE_RETIRED === $c['state'] ) { return 'success'; } return in_array( $c['state'], array( AIEO_Overlap::STATE_KEPT, AIEO_Overlap::STATE_LATER ), true ) ? 'mono' : 'info'; }; $aieo_ov_notice = static function ( $text, $tone = 'info', $opts = array() ) { echo \Rooster\Admin\Ui::notice( $text, $tone, array_merge( array( 'inline' => true ), $opts ) ); }; $aieo_ov_withdraw = static function () use ( $simplify ) { $ask = \Rooster\Admin\States::confirm( 'aieo-ov-withdraw-ask', 'off', __( 'Withdraw and delete what we hold?', 'ai-eshop-optimizer' ), esc_html__( 'The plugin list is deleted here and at Rooster Systems, and your consent to the scan is withdrawn. You can scan again later.', 'ai-eshop-optimizer' ), array( 'confirm' => __( 'Withdraw', 'ai-eshop-optimizer' ) ) ); ?>
' . 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; ?>
'overlaps-both', 'icon' => 'copy', 'title' => __( 'Both of you do this', 'ai-eshop-optimizer' ), 'description' => __('Installed plugins that do a job Rooster One also does, with the evidence and your choice of which to keep.', 'ai-eshop-optimizer'), 'footer' => '' !== trim( (string) preg_replace( '//s', '', $aieo_ov_catalogue_line ) ) ? $aieo_ov_catalogue_line : '', 'col' => 2, 'level' => $aieo_ov_level, ) ); echo $aieo_ov_open; ?> __( 'Nothing overlaps with Rooster One', 'ai-eshop-optimizer' ), 'text' => __( 'Only plugins with a hand-checked relationship are ever listed, and only when they are on this site.', 'ai-eshop-optimizer' ), 'compact' => true ) ); ?> $aieo_ov_plain ? ( $c['fault_live'] ? __( 'Active, both running', 'ai-eshop-optimizer' ) : __( 'Active', 'ai-eshop-optimizer' ) ) : ( $c['active'] ? __( 'Active, owns your page head', 'ai-eshop-optimizer' ) : ( $c['installed'] ? __( 'Installed, not active', 'ai-eshop-optimizer' ) : __( 'Data left behind', 'ai-eshop-optimizer' ) ) ), AIEO_Overlap::STATE_KEPT => __( 'Kept, by your choice', 'ai-eshop-optimizer' ), AIEO_Overlap::STATE_LATER => __( 'Decide later', 'ai-eshop-optimizer' ), AIEO_Overlap::STATE_MIGRATING => __( 'Switching', 'ai-eshop-optimizer' ), AIEO_Overlap::STATE_PARTIAL => __( 'Switching, with exceptions', 'ai-eshop-optimizer' ), AIEO_Overlap::STATE_RETIRED => __( 'Retired', 'ai-eshop-optimizer' ), ); $st = isset( $status[ $c['state'] ] ) ? $status[ $c['state'] ] : $c['state']; ?> true ) ); if ( $aieo_ov_embedded ) { $aieo_ov_row_open = '
' . '

' . esc_html( $c['label'] ) . '

' . $aieo_ov_row_badge . '

'; $aieo_ov_row_close = '
'; } else { list( $aieo_ov_row_open, $aieo_ov_row_close ) = AIEO_DMM_UI::card( array( 'title' => $c['label'], 'level' => 3, 'class' => $aieo_ov_row_class, 'meta' => $aieo_ov_row_badge, 'attrs' => array( 'id' => 'aieo-ov-card-' . $c['id'], 'data-aieo-overlap' => $c['id'] ), ) ); } echo $aieo_ov_row_open; ?>
true ) ); ?>
true ) ); ?>

true ) ); ?>

  1. true ) ); ?>
true ) ); ?> true ) ); ?> true ) ); ?>

true ) ); ?>
true ) ); ?>

true ) ); ?> true ) ); ?>

  1. true ) ); ?>
true ) ); ?>

( ! empty( $alongside ) && ! empty( $scan ) ) ? 2 : 1 ) ); } ?> 'overlaps-alongside', 'icon' => 'arrow-right-left', 'title' => __( 'Works alongside', 'ai-eshop-optimizer' ), 'description' => __( 'Nothing to decide here. These stay, and Rooster One works with them.', 'ai-eshop-optimizer' ), 'col' => 1, 'level' => $aieo_ov_level, ) ); echo $aieo_ov_open; ?>

' . esc_html( $c['label'] ) . '

'; $aieo_ov_row_close = ''; } else { list( $aieo_ov_row_open, $aieo_ov_row_close ) = AIEO_DMM_UI::card( array( 'title' => $c['label'], 'level' => 3, 'class' => 'aieo-ov-along', 'attrs' => array( 'id' => 'aieo-ov-card-' . $c['id'], 'data-aieo-overlap' => $c['id'] ), ) ); } echo $aieo_ov_row_open; ?>

= 1000000 ) { return number_format_i18n( floor( $n / 1000000 ) ) . 'M+'; } if ( $n >= 1000 ) { return number_format_i18n( floor( $n / 1000 ) ) . 'k+'; } return $n > 0 ? number_format_i18n( $n ) : ''; }; $aieo_kind_words = array( 'replaces' => __( 'replaces', 'ai-eshop-optimizer' ), 'supersedes' => __( 'also does this', 'ai-eshop-optimizer' ), 'conflicts' => __( 'clashes when both run', 'ai-eshop-optimizer' ), 'alongside' => __( 'works alongside', 'ai-eshop-optimizer' ), ); $aieo_kinds_text = static function ( $kinds ) use ( $aieo_kind_words ) { $out = array(); foreach ( (array) $kinds as $k ) { $out[] = isset( $aieo_kind_words[ $k ] ) ? $aieo_kind_words[ $k ] : (string) $k; } return implode( ' + ', $out ); }; ?> 'overlaps-scan', 'icon' => 'search', 'title' => __( 'Your last scan', 'ai-eshop-optimizer' ), 'meta' => AIEO_DMM_UI::title_badge( (string) wp_date( get_option( 'date_format' ), (int) $scan['at'] ) ), 'class' => 'aieo-scan', 'col' => 2, 'level' => $aieo_ov_level, ) ); echo $aieo_ov_open; ?>