chore(bricks): remove dead constructor hook + document sanitizer contract - #120
Merged
jackgranatowski merged 1 commit intoMay 27, 2026
Merged
Conversation
…ract
- REST controller: remove add_action('rest_api_init') from constructor
since routes are now registered directly by the rest_api_init hook in
slashed-bricks.php. Eliminates redundant double-registration on REST
requests.
- Token sanitizer: add COMPOUND-PREFIX KEYS docblock to
sanitize_color_section() documenting that dark-mode keys
(brand_dark_*) intentionally enter the 'direct' bucket and that
color names must never end in 'hex' or 'raw'.
This was referenced May 27, 2026
jackgranatowski
deleted the
chore/rest-controller-cleanup-and-sanitizer-docs
branch
May 31, 2026 18:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request was created by @kiro-agent on behalf of @jackgranatowski 👻
Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro autonomous agent
Follow-up to #116 (merged). Addresses two non-blocking review findings:
Changes
REST controller: remove dead
add_actionfrom constructorslashed_bricks_rest_routes_init()already callsregister_routes()directly insiderest_api_initadd_action('rest_api_init', ...)was redundant — it would fire too late (hook already running) or cause double-registrationToken sanitizer: document compound-prefix key contract
brand_dark_primaryenter the sanitizer's "direct" bucket (they don't end in_hex/_raw)No functional changes
Both are documentation/cleanup only — no behavior differs.