output_path() === $lltxt_rel ) { $lltxt_emitter = $lltxt_obj; break; } } $lltxt_mime = $lltxt_emitter ? $lltxt_emitter->mime_type() : 'text/plain; charset=utf-8'; $lltxt_body = Lltxt_Cache::read( $lltxt_rel ); if ( false === $lltxt_body && null !== $lltxt_emitter ) { // Static file missing — render live as a graceful fallback. $lltxt_body = $lltxt_emitter->render(); } if ( false === $lltxt_body || null === $lltxt_body ) { status_header( 404 ); header( 'Content-Type: text/plain; charset=utf-8' ); echo "Not generated yet\n"; return; } status_header( 200 ); header( 'Content-Type: ' . $lltxt_mime ); header( 'X-Robots-Tag: all' ); header( 'Cache-Control: public, max-age=300, stale-while-revalidate=900' ); // $lltxt_body is plugin-generated markdown/JSON/XML to be served verbatim. echo $lltxt_body; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped