File manager - Edit - /home/asiatechinc/public_html/asiatech-websites/cloudsendvilla.com/wp-content/mu-plugins/file-lockdown.php
Back
<?php /** * FILE LOCKDOWN (MU-Plugin) * - Upload (admin + REST + classic handlers) engeller * - Attachment silme engeller * - Tema/eklenti/dosya düzenleme & güncellemeleri engeller */ if (!defined('ABSPATH')) { exit; } if (!defined('DISALLOW_FILE_MODS')) define('DISALLOW_FILE_MODS', true); if (!defined('DISALLOW_FILE_EDIT')) define('DISALLOW_FILE_EDIT', true); add_filter('wp_handle_upload_prefilter', function ($file) { return new WP_Error('file_lockdown_upload_blocked', 'Lock modu aktif: dosya yükleme kapalı.'); }, 9999); add_filter('pre_handle_upload', function ($file) { return new WP_Error('file_lockdown_upload_blocked', 'Lock modu aktif: dosya yükleme kapalı.'); }, 9999); add_filter('rest_pre_dispatch', function ($result, $server, $request) { $route = (string) $request->get_route(); $method = (string) $request->get_method(); if ($method === 'POST' && strpos($route, '/wp/v2/media') !== false) { return new WP_Error('file_lockdown_rest_upload_blocked', 'Lock modu aktif: medya yükleme kapalı.', ['status' => 403]); } return $result; }, 9999, 3); add_filter('pre_delete_attachment', function ($delete, $post, $force_delete) { return false; }, 9999, 3); add_action('admin_init', function () { $script = $_SERVER['SCRIPT_NAME'] ?? ''; if (stripos($script, 'async-upload.php') !== false) { wp_die('Lock modu aktif: dosya yükleme kapalı.', 403); } }, 1); add_filter('file_mod_allowed', '__return_false', 9999);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings