Adds a read-only REST route for inspecting plugin settings that WordPress core REST does not expose.
GET /wp-json/ans-ops/v1/site/inspect — returns allow-listed options. Pass ?name=<option> for one, omit for all. Requires manage_options.
Motivation: Tickera and its Mailchimp add-on store everything in a single serialized option, so there was no way to check what address or settings they hold without wp-admin.
Design notes:
- The inspect allow-list is separate from the one used by
/site/options. That list is shared with the option writer, so anything added there would become writable. Inspect is read-only by construction. - Values whose key matches
key|secret|token|password|salt|auth|credential|privateare returned as***redacted***, at every level of a nested settings array. Empty values stay empty rather than implying a secret is set. - Recursion is depth-capped at 8.
Initial allow-list: tc_general_setting, tc_general_settings, tc_mailchimp_settings, the five woocommerce_email_* fields, woocommerce_store_address, admin_email, siteurl, home. Extend via the ans_ops_inspectable_options filter.