engine = AI_Explainer_Pro_Detection_Engine::get_instance(); } public function render() { $detection = null; $posted = ''; if ( isset( $_POST['aiep_detect_content'] ) && isset( $_POST['_wpnonce'] ) ) { $nonce = sanitize_text_field( wp_unslash( $_POST['_wpnonce'] ) ); if ( wp_verify_nonce( $nonce, 'aiep_detect_content' ) ) { $posted = isset( $_POST['aiep_content'] ) ? sanitize_textarea_field( wp_unslash( $_POST['aiep_content'] ) ) : ''; if ( ! empty( $posted ) ) { $detection = $this->engine->detect( $posted ); } } } ?>

render_results( $detection ); ?>
= 0.7 ) { $verdict = __( 'Likely Human-Written', 'ai-explainer-pro' ); $cls = 'human'; } elseif ( $human_score >= 0.4 ) { $verdict = __( 'Uncertain / Mixed Content', 'ai-explainer-pro' ); $cls = 'uncertain'; } else { $verdict = __( 'Likely AI-Generated', 'ai-explainer-pro' ); $cls = 'ai'; } ?>

%

()

__( 'Statistical', 'ai-explainer-pro' ), 'linguistic' => __( 'Linguistic', 'ai-explainer-pro' ), 'structural' => __( 'Structural', 'ai-explainer-pro' ), 'vocabulary' => __( 'Vocabulary', 'ai-explainer-pro' ), 'repetition' => __( 'Repetition', 'ai-explainer-pro' ), 'api' => __( 'API', 'ai-explainer-pro' ), ]; foreach ( $detection['methods'] as $method => $data ) : $pct = round( ( $data['score'] ?? 0 ) * 100 ); ?>
%