"Disallow: /", "User-agent: Claude-Web" => "Disallow: /", "User-agent: CCbot" => "Disallow: /", "User-agent: FacebookBot" => "Disallow: /", "User-agent: Google-Extended" => "Disallow: /", "User-agent: GPTBot" => "Disallow: /", "User-agent: PiplBot" => "Disallow: /", "User-agent: ChatGPT-User" => "Disallow: /", "User-agent: PerplexityBot" => "Disallow: /", "User-agent: Bytespider" => "Disallow: /", "User-agent: Omgilibot" => "Disallow: /", "User-agent: Omgili" => "Disallow: /", "User-agent: ImagesiftBot" => "Disallow: /", "User-agent: BardBot" => "Disallow: /", "User-agent: KomoBot" => "Disallow: /" ]; public function __construct() { add_filter('robots_txt', [$this, 'modify_robots_txt'], 999, 2); // Use higher priority } public function modify_robots_txt($output, $public) { // Add start comment for the block $output .= "\n# START AI Scrape Protect block\n# ---------------------------\n"; // Append the disallow rules for AI bots foreach ($this->lines_to_add as $user_agent => $disallow) { $output .= "$user_agent\n$disallow\n"; } // Add end comment for the block $output .= "# ---------------------------\n# END AI Scrape Protect block\n"; return $output; } } new AISP_Manage_Robots_Txt();