"; echo '
' . esc_html__( 'The saved Incognito Mode owner is missing or is no longer a site administrator. Content access remains blocked until an administrator claims ownership or disables Incognito Mode.', 'ai-for-seo' ) . '
'; echo "'; echo ''; return; } // Defense in depth keeps direct includes behind the same route-level administrative boundary. if ( ! ai4seo_can_administer_plugin() ) { wp_die( esc_html__( 'You are not allowed to access this page.', 'ai-for-seo' ), esc_html__( 'Access denied', 'ai-for-seo' ), array( 'response' => 403 ) ); } ai4seo_render_activation_area( true ); ai4seo_echo_wp_kses( ai4seo_get_account_quality_notice( false ) ); $ai4seo_robhub_subscription = ai4seo_robhub_api()->read_environmental_variable( ai4seo_robhub_api()::ENVIRONMENTAL_VARIABLE_SUBSCRIPTION ); $ai4seo_is_robhub_account_synced = ai4seo_robhub_api()->is_account_synced(); $ai4seo_is_auth_locked = ai4seo_robhub_api()->is_auth_data_locked(); $ai4seo_has_rotation_recovery = ai4seo_robhub_api()->has_api_password_rotation_recovery_intent(); $ai4seo_rotation_recovery_notice = ai4seo_robhub_api()->get_api_password_rotation_recovery_notice_state(); // Define boolean to determine whether to read license-data. $ai4seo_show_license_details = (bool) ai4seo_read_environmental_variable( AI4SEO_ENVIRONMENTAL_VARIABLE_HAS_PURCHASED_SOMETHING ); // Allow the read-only support flag to reveal saved license details without changing account data. // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- This read-only support flag only changes local account-page display. if ( isset( $_GET['ai4seo_force_show_licence_details'] ) && sanitize_text_field( wp_unslash( $_GET['ai4seo_force_show_licence_details'] ) ) ) { $ai4seo_show_license_details = true; } // Define license variables. $ai4seo_auth_data = ai4seo_robhub_api()->read_auth_data(); $ai4seo_license_username = $ai4seo_auth_data[0] ?? ''; $ai4seo_license_key = $ai4seo_auth_data[1] ?? ''; if ( ! $ai4seo_license_username || ! $ai4seo_license_key ) { $ai4seo_show_license_details = false; } if ( ! $ai4seo_show_license_details ) { $ai4seo_license_username = ''; $ai4seo_license_key = ''; } // Prepare enhanced reporting. $ai4seo_did_user_accept_enhanced_reporting = (bool) ai4seo_read_environmental_variable( AI4SEO_ENVIRONMENTAL_VARIABLE_ENHANCED_REPORTING_ACCEPTED ); $ai4seo_enhanced_reporting_revoke_timestamp = (int) ai4seo_read_environmental_variable( AI4SEO_ENVIRONMENTAL_VARIABLE_ENHANCED_REPORTING_REVOKED_TIME ); // Define variables for the current username and email. $ai4seo_current_user = wp_get_current_user(); $ai4seo_current_user_username = ( $ai4seo_current_user->user_login ?? 'unknown' ); $ai4seo_current_user_email = ( $ai4seo_current_user->user_email ?? 'unknown' ); // Define variables for the settings. $ai4seo_setting_enable_incognito_mode = ai4seo_get_setting( AI4SEO_SETTING_ENABLE_INCOGNITO_MODE ); $ai4seo_setting_enable_white_label = ai4seo_get_setting( AI4SEO_SETTING_ENABLE_WHITE_LABEL ); $ai4seo_setting_plugin_name = ai4seo_get_setting( AI4SEO_SETTING_INSTALLED_PLUGINS_PLUGIN_NAME ); $ai4seo_setting_plugin_description = str_replace( '*' . AI4SEO_PLUGIN_NAME . '*', AI4SEO_PLUGIN_NAME, ai4seo_get_setting( AI4SEO_SETTING_INSTALLED_PLUGINS_PLUGIN_DESCRIPTION ) ); $ai4seo_setting_display_source_code_notes = ai4seo_get_setting( AI4SEO_SETTING_ADD_GENERATOR_HINTS ); $ai4seo_setting_source_code_notes_content_start = ai4seo_get_setting( AI4SEO_SETTING_META_TAGS_BLOCK_STARTING_HINT ); $ai4seo_setting_source_code_notes_content_end = ai4seo_get_setting( AI4SEO_SETTING_META_TAGS_BLOCK_ENDING_HINT ); $ai4seo_robhub_subscription_plan = ai4seo_get_account_readiness()['plan']; $ai4seo_has_purchased_something = (bool) ai4seo_read_environmental_variable( AI4SEO_ENVIRONMENTAL_VARIABLE_HAS_PURCHASED_SOMETHING ); // ___________________________________________________________________________________________ \\ // === OUTPUT ================================================================================ \\ // ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ \\ echo "' . esc_html__( 'License reconnection required', 'ai-for-seo' ) . '
'; echo ''; if ( 'confirmed' === $ai4seo_rotation_recovery_status && 'sent' === $ai4seo_rotation_credential_email_state ) { echo esc_html__( 'A replacement license key was sent to the verified Stripe checkout email. Check your inbox and spam folder, then enter the emailed license owner and key below and save your changes.', 'ai-for-seo' ); } elseif ( 'confirmed' === $ai4seo_rotation_recovery_status && 'failed' === $ai4seo_rotation_credential_email_state ) { echo esc_html__( 'A replacement license key was generated, but email delivery could not be confirmed. Delivery retries automatically; use the license recovery help below if the verified Stripe checkout inbox still has no message.', 'ai-for-seo' ); } elseif ( 'confirmed' === $ai4seo_rotation_recovery_status ) { echo esc_html__( 'A replacement license key is being delivered to the verified Stripe checkout email. Check your inbox and spam folder, then enter the emailed license owner and key below and save your changes.', 'ai-for-seo' ); } elseif ( 'pending' === $ai4seo_rotation_recovery_status ) { echo esc_html__( 'Secure license recovery is awaiting confirmation. Refresh the account status, then check the verified Stripe checkout email before reconnecting below.', 'ai-for-seo' ); } else { // Malformed or unreadable local recovery bytes remain quarantined and are never rendered. echo esc_html__( 'Secure license recovery needs attention. Check the verified Stripe checkout inbox or use the recovery help below, then reconnect with the verified credentials.', 'ai-for-seo' ); } echo '
'; echo "'; echo '"; ai4seo_echo_wp_kses( $ai4seo_this_setting_description ); echo '
'; echo '"; ai4seo_echo_wp_kses( $ai4seo_this_setting_description ); echo '
'; echo '"; ai4seo_echo_wp_kses( $ai4seo_this_setting_description ); echo '
'; echo '"; ai4seo_echo_wp_kses( $ai4seo_this_setting_description ); echo '
'; echo '"; ai4seo_echo_wp_kses( $ai4seo_this_setting_description ); echo '
'; echo '"; ai4seo_echo_wp_kses( $ai4seo_this_setting_description ); echo '
'; echo '"; ai4seo_echo_wp_kses( $ai4seo_this_setting_description ); echo '
'; echo '";
$ai4seo_latest_tos_and_toc_and_pp_version = ai4seo_get_latest_tos_and_toc_and_pp_version();
/* translators: %s: Latest version number */
echo esc_html( sprintf( __( 'Current version: %s', 'ai-for-seo' ), $ai4seo_latest_tos_and_toc_and_pp_version ) ) . '.
';
ai4seo_echo_wp_kses( ai4seo_get_tos_toc_and_pp_accepted_time_output() );
echo '
"; // revoked? if ( ! $ai4seo_did_user_accept_enhanced_reporting && $ai4seo_enhanced_reporting_revoke_timestamp ) { $ai4seo_readable_revoked_time = ai4seo_format_unix_timestamp( $ai4seo_enhanced_reporting_revoke_timestamp ); ai4seo_echo_wp_kses( ai4seo_get_svg_tag( 'square-xmark', '', 'ai4seo-16x16-icon ai4seo-red-icon' ) ); echo ' '; /* translators: %s: Revoked time */ printf( esc_html__( 'Revoked on %s.', 'ai-for-seo' ), esc_html( $ai4seo_readable_revoked_time ) ); } else { ai4seo_echo_wp_kses( ai4seo_get_enhanced_reporting_accepted_time_output() ); } echo '
'; echo '