option list update with form

This commit is contained in:
asus
2024-03-24 15:05:00 +01:00
parent 1415fc14a2
commit f882caf850
2 changed files with 41 additions and 12 deletions

View File

@@ -44,8 +44,23 @@ function patches_choice() {
/*
*
*
[24-Mar-2024 12:24:08 UTC] -> _POST {
"action":"add_patches",
"nonce_name":"7eeb560dc0",
"_wp_http_referer":"\/wp-admin\/admin.php?page=fbpatch-plugin",
"hide_show":"on"
}
*/
error_log("-> _POST: " . json_encode($_POST));
$pathes_on = array();
foreach($_POST as $key => $value) {
if ($value !== 'on') {
continue;
}
$pathes_on[] = $key;
}
error_log("-> pathes_update: " . json_encode($pathes_on));
Fbpatch::set_patches($pathes_on);
\FBPATCH\redirect_menu_referer($_POST);
}