修复了一些问题
This commit is contained in:
@@ -92,6 +92,10 @@ abstract class ControllerBase {
|
||||
case 'array':
|
||||
$out[$key] = is_array($val) ? $val : [];
|
||||
break;
|
||||
case 'attachment_ids':
|
||||
$ids = is_array($val) ? array_filter(array_map('absint', $val)) : [];
|
||||
$out[$key] = array_values(array_unique($ids));
|
||||
break;
|
||||
default:
|
||||
$out[$key] = sanitize_text_field($val);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user