adding patchs files according to form in menu

This commit is contained in:
asus
2024-03-24 16:16:55 +01:00
parent 28a1f7922d
commit 1745d8754d
4 changed files with 12 additions and 6 deletions

View File

@@ -17,7 +17,6 @@ if (!defined('ABSPATH')) {
*/
function plugin_content() {
$patches = Fbpatch::get_patches();
error_log("in plugin_content, patches: ".json_encode($patches));
$nonce = Fbpatch::NONCE;
$admin_post_patches = Fbpatch::ADMIN_POST_PATCH_CHOICE;
ob_start();
@@ -51,7 +50,6 @@ function patches_choice() {
"hide_show":"on"
}
*/
error_log("-> _POST: " . json_encode($_POST));
$pathes_on = array();
foreach($_POST as $key => $value) {
if ($value !== 'on') {
@@ -59,7 +57,6 @@ function patches_choice() {
}
$pathes_on[] = $key;
}
error_log("-> pathes_update: " . json_encode($pathes_on));
Fbpatch::set_patches($pathes_on);
\FBPATCH\redirect_menu_referer($_POST);