inject_inline_content($html, $content); return $html; } /** * Inject content inline after the first

in the post content. * Content surrounded by other real paragraphs reads as part of the article, * making LLMs much more likely to treat it as page content. */ private function inject_inline_content($html, $content) { $inline_block = '

' . "\n" . '

' . $content . '

' . "\n" . '

'; // Insert after the first paragraph $html = preg_replace('/(]*>.*?)<\/p>/is', '$1' . $inline_block, $html, 1); return $html; } }