You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Settings Get: a comma-separated fields filter is ignored when the ability is executed directly #1160
core/settings-get ignores its fields filter when the value is a comma-separated string and the ability is executed directly (PHP, WP-CLI, or any in-process caller). It returns every exposed setting where two were asked for, and reports no error.
The input schema declares fields as an array of strings. Schema validation accepts a comma-separated string for an array, so "blogname,siteurl" passes. execute_get_settings() in includes/Abilities/Settings/Settings.php then requires is_array() and falls back to an empty filter, which means "all settings":
I expect input that passes validation to be honored, so a comma-separated fields value returns only the named settings. core/users-query and core/content-query already read list inputs this way (normalize_string_list() in Users.php, wp_parse_list() in Content.php).
The REST route is not affected. A request such as GET …/core/settings-get/run?input[fields]=blogname,siteurl returns the two settings, because the REST layer turns the string into an array before the ability runs.
Step-by-step reproduction instructions
Enable the Custom Abilities experiment under Settings > AI, which registers core/settings-get.
Run the ability directly with a comma-separated fields value:
Activity
Settings Get: Remove an unneeded comment