array( 'label' => __( 'General', 'ai-siteark' ), 'icon' => 'dashicons-admin-generic', 'pro' => false ), 'schedule' => array( 'label' => __( 'Schedule & retention', 'ai-siteark' ), 'icon' => 'dashicons-clock', 'pro' => true ), 'destinations' => array( 'label' => __( 'Destinations', 'ai-siteark' ), 'icon' => 'dashicons-cloud', 'pro' => true ), 'license' => array( 'label' => __( 'License', 'ai-siteark' ), 'icon' => 'dashicons-admin-network', 'pro' => false ), ); if ( $aisiteark_dotorg ) { $aisiteark_tabs = array( 'general' => $aisiteark_tabs['general'] ); } // phpcs:ignore WordPress.Security.NonceVerification.Recommended $aisiteark_tab = isset( $_GET['tab'] ) ? sanitize_key( wp_unslash( $_GET['tab'] ) ) : 'general'; if ( ! isset( $aisiteark_tabs[ $aisiteark_tab ] ) ) { $aisiteark_tab = 'general'; } // phpcs:ignore WordPress.Security.NonceVerification.Recommended $aisiteark_msg = isset( $_GET['msg'] ) ? sanitize_key( wp_unslash( $_GET['msg'] ) ) : ''; ?>

page_header( __( 'Settings', 'ai-siteark' ), __( 'What to back up, schedules, off-site destinations and your license — grouped in one place.', 'ai-siteark' ) ); ?> array( 'success', __( 'Settings saved.', 'ai-siteark' ) ), 'test_sent' => array( 'success', __( 'Test email sent.', 'ai-siteark' ) ), 'test_failed' => array( 'error', __( 'Could not send the test email — check the address and your site mail setup.', 'ai-siteark' ) ), 'cloud_connected' => array( 'success', __( 'Cloud destination connected. New backups will upload there automatically.', 'ai-siteark' ) ), 'cloud_disconnected' => array( 'success', __( 'Cloud destination disconnected.', 'ai-siteark' ) ), 'cloud_error' => array( 'error', __( 'Could not connect that cloud destination. Please try again.', 'ai-siteark' ) ), 'cloud_pro' => array( 'error', __( 'Off-site destinations are a Pro feature. Upgrade to connect cloud storage.', 'ai-siteark' ) ), 'license_active' => array( 'success', __( 'License activated.', 'ai-siteark' ) ), 'license_inactive' => array( 'info', __( 'License deactivated.', 'ai-siteark' ) ), 'code_sent' => array( 'success', __( 'We emailed you a 6-digit verification code. Enter it below to finish activation.', 'ai-siteark' ) ), 'code_invalid' => array( 'error', __( 'That code is invalid or expired. Please try again or resend a new code.', 'ai-siteark' ) ), 'license_email' => array( 'error', __( 'Please enter a valid email address.', 'ai-siteark' ) ), 'license_terms' => array( 'error', __( 'You must accept the Terms and Privacy Policy to activate.', 'ai-siteark' ) ), 'license_seats' => array( 'error', __( 'This key has reached its site limit. Deactivate it on another site or upgrade your plan to add more sites.', 'ai-siteark' ) ), 'license_checked' => array( 'info', __( 'Checked for updates.', 'ai-siteark' ) ), 'license_error' => array( 'error', __( 'Activation failed. Please check your details (and that the site can reach the license server) and try again.', 'ai-siteark' ) ), ); if ( isset( $aisiteark_notices[ $aisiteark_msg ] ) ) : $aisiteark_notice_text = $aisiteark_notices[ $aisiteark_msg ][1]; // Append the provider's own error (from the OAuth broker) when present, so a // failed cloud connect says *why* — see docs/CLOUD-OAUTH-TROUBLESHOOTING.md. if ( 'cloud_error' === $aisiteark_msg ) { $aisiteark_detail = get_transient( 'aisiteark_cloud_error_detail' ); delete_transient( 'aisiteark_cloud_error_detail' ); if ( $aisiteark_detail ) { /* translators: %s: error message reported by the storage provider. */ $aisiteark_notice_text .= ' ' . sprintf( __( 'Provider said: “%s”.', 'ai-siteark' ), $aisiteark_detail ); } } ?>

__( 'Database (all tables)', 'ai-siteark' ), 'uploads' => __( 'Media uploads', 'ai-siteark' ), 'themes' => __( 'Themes', 'ai-siteark' ), 'plugins' => __( 'Plugins', 'ai-siteark' ), 'muplugins' => __( 'Must-use plugins', 'ai-siteark' ), 'other' => __( 'Other wp-content (languages, drop-ins, custom folders)', 'ai-siteark' ), ); foreach ( $aisiteark_items as $aisiteark_ik => $aisiteark_lbl ) : ?>

' . esc_html( $aisiteark_host ) . '' ) ); ?>

—

—

   />


  


 

pro_lock_card( 'dashicons-clock', __( 'Automatic backups & retention', 'ai-siteark' ), __( 'Schedule daily or weekly backups that run automatically, with count- and age-based retention that prunes old copies so storage never runs away. Optional AES-256 encryption for unattended backups. This is a Pro feature.', 'ai-siteark' ), $aisiteark_checkout ); ?>


pro_lock_card( 'dashicons-cloud', __( 'Off-site destinations', 'ai-siteark' ), __( 'Upload every backup off-site to Google Drive, OneDrive, Dropbox, Amazon S3 or FTP/SFTP, so your data survives even if this server is lost. Connecting a destination is a Pro feature.', 'ai-siteark' ), $aisiteark_checkout ); ?>
__( 'Google Drive', 'ai-siteark' ), 'microsoft' => __( 'OneDrive', 'ai-siteark' ), 'dropbox' => __( 'Dropbox', 'ai-siteark' ), 's3' => __( 'Amazon S3', 'ai-siteark' ), 'ftp' => __( 'FTP / FTPS', 'ai-siteark' ) ); $aisiteark_conn = array( 'google' => ! empty( \AtoZ\SiteArk\Helpers\Backup_Sync::provider_tokens( 'google' )['refresh_token'] ), 'microsoft' => ! empty( \AtoZ\SiteArk\Helpers\Backup_Sync::provider_tokens( 'microsoft' )['refresh_token'] ), 'dropbox' => ! empty( \AtoZ\SiteArk\Helpers\Backup_Sync::provider_tokens( 'dropbox' )['refresh_token'] ), 's3' => ( ! empty( $aisiteark_s3['key'] ) && ! empty( $aisiteark_s3['bucket'] ) ), 'ftp' => ! empty( $aisiteark_ftp['host'] ), ); $aisiteark_opt = function ( $key, $selected, $disable ) use ( $aisiteark_dlabels, $aisiteark_conn ) { $status = $aisiteark_conn[ $key ] ? ( in_array( $key, array( 's3', 'ftp' ), true ) ? __( 'configured', 'ai-siteark' ) : __( 'connected', 'ai-siteark' ) ) : __( 'not set up', 'ai-siteark' ); printf( '', esc_attr( $key ), selected( $selected === $key, true, false ), disabled( $key === $disable, true, false ), esc_html( $aisiteark_dlabels[ $key ] ), esc_html( $status ) ); }; ?>

' . esc_html( $aisiteark_dlabels[ $aisiteark_one ] ?? '' ) . '' ); } elseif ( 'both' === $aisiteark_mode ) { /* translators: 1,2: destination names. */ printf( esc_html__( 'Every backup uploads to both %1$s and %2$s.', 'ai-siteark' ), '' . esc_html( $aisiteark_dlabels[ $aisiteark_dest ] ) . '', '' . esc_html( $aisiteark_dlabels[ $aisiteark_dest2 ] ) . '' ); } else { /* translators: 1: primary, 2: secondary. */ printf( esc_html__( '%1$s, then %2$s if %1$s fails.', 'ai-siteark' ), '' . esc_html( $aisiteark_dlabels[ $aisiteark_dest ] ) . '', '' . esc_html( $aisiteark_dlabels[ $aisiteark_dest2 ] ) . '' ); } ?>

__( 'Google Drive', 'ai-siteark' ), 'microsoft' => __( 'OneDrive', 'ai-siteark' ), 'dropbox' => __( 'Dropbox', 'ai-siteark' ) ) as $aisiteark_pk => $aisiteark_pl ) : ?>


.r2.cloudflarestorage.com (region: auto).', 'ai-siteark' ); ?>

 · 

' . esc_html( $aisiteark_lic_email ) . '' ) ); ?>

get_names() as $aisiteark_rslug => $aisiteark_rname ) : if ( 'administrator' === $aisiteark_rslug ) { continue; } $aisiteark_lvl = \AtoZ\SiteArk\Helpers\Capabilities::grant_level( $aisiteark_rslug ); ?>