Skip to content

Conversation

@GeoffDusome
Copy link
Contributor

What does this do/fix?

This pull request improves the way the search icon SVG is loaded in the masthead-search block to make it more robust and reliable. Instead of directly fetching the SVG using a URL, it first tries to read the file from the file system and falls back to a remote request only if necessary. This is a similar approach we took while grabbing the theme.json file in the Block Editor Custom Alignments plugin.

Improvements to SVG loading:

  • The code now attempts to load the SVG icon from the file system using file_get_contents and only falls back to using wp_remote_get if the file read fails, ensuring better reliability and compatibility across environments.

QA

Links to relevant issues

Screenshots/video:

Copy link
Contributor

@Vinsanity Vinsanity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢

@GeoffDusome GeoffDusome added In QA Waiting on QA and removed Needs FE Review labels Jan 5, 2026
Copy link
Collaborator

@dpellenwood dpellenwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍏

@GeoffDusome GeoffDusome merged commit 8a93f8e into main Jan 9, 2026
7 checks passed
@GeoffDusome GeoffDusome deleted the task/MOOSE-325/masthead-search-icon branch January 9, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

In QA Waiting on QA Launch Environment Deploys to dokku

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants