Normalize stored SVG icon IDs when switching between one and several … - #42
Merged
Conversation
herewithme
previously approved these changes
Sep 4, 2026
asadowski10
approved these changes
Sep 7, 2026
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.
…sprites
Note
Medium Risk
Stored field values change format on save and frontend/theme code that assumed bare ids with a single sprite may need to handle
sprite#symbol; admin-only normalization depends on parsing all sprites when legacy values load.Overview
Release 2.3.0 fixes empty Select2 selections when older data still stores bare symbol ids (
icon-alert) while the picker now always exposessprite.svg#icon-idoption values.Sprite options from
parse_svg()always use thebasename(sprite)#symbolid (the single-sprite “bare id only” branch is removed).load_valueandupdate_valuerunnormalize_icon_value(), which maps legacy bare strings to the matching sprite option via a memoized symbol→option map (first registered sprite wins); numeric media attachment ids are unchanged. Values are rewritten to the canonical form on save.Version metadata and changelog are updated; minor PHPCS ignores on ACF subclass constructors.
Reviewed by Cursor Bugbot for commit 0e04eb5. Bugbot is set up for automated code reviews on this repo. Configure here.