Skip to content

How to use the Icon API in WordPress 7.1 #490

Closed

Description

@bph

Discussed in #486

Originally posted by justintadlock July 28, 2026
WordPress 7.1 will ship the ability register icons and collections:

We need a deep-dive into how to use this API in plugins and themes.

Some noteworthy items should include:

Activity

  1. Jiwoon-Kim commented on Aug 6, 2026

    @Jiwoon-Kim

    A registry-driven dynamic inline SVG sprite could also be considered as a performance optimization, although at this stage it would clearly be overengineering.

  2. Jiwoon-Kim commented on Aug 6, 2026

    @Jiwoon-Kim

    In practice, I have already overcome most of these limitations by shipping an icon font with my block theme and rendering that shared icon vocabulary from companion-plugin blocks when needed.

    What makes this work valuable to me is more specific: it may provide a stable way for themes to customize inline SVGs that are currently hard-coded inside core blocks.

    For most interface needs, the existing theme-and-companion-plugin approach works well. The remaining difficult cases are core controls whose visual implementation is embedded directly in block markup, such as Navigation disclosure controls, responsive menu controls, and Image lightbox controls.

    If those controls could request semantic icon identifiers through the registry, a theme could supply its own SVG implementation while core retained ownership of the component's markup, behaviour, accessibility, states, and responsive logic. That would remove the need to hide core SVGs and reconstruct them through fragile CSS selectors or icon-font pseudo-elements.

  3. justintadlock commented on Aug 12, 2026

    @justintadlock
  4. moved this from To-do to Needs 1st review in Developer Blog Content Boardon Aug 14, 2026
  5. justintadlock commented on Aug 14, 2026

    @justintadlock

    First draft is wrapped up. Thanks to @bph for some initial review.

    Doc: https://docs.google.com/document/d/1PrvPzVW3ER0oGDuhsHVwheZP7SIzWGkbAex2jiOe22Y/edit?usp=sharing

  6. bph commented on Aug 18, 2026

    @bph
    CollaboratorAuthor

    @justintadlock you are most welcome. I also reviewed the finished draft.

  7. moved this from Needs 1st review to Done w/ 1st Review in Developer Blog Content Boardon Aug 18, 2026
  8. moved this from Done w/ 1st Review to Needs 2nd review in Developer Blog Content Boardon Aug 18, 2026
  9. ryanwelcher commented on Aug 18, 2026

    @ryanwelcher

    Second review completed.

  10. moved this from Needs 2nd review to Done w/ 2nd review in Developer Blog Content Boardon Aug 18, 2026
  11. moved this from Done w/ 2nd review to Ready to publish in Developer Blog Content Boardon Aug 18, 2026
  12. justintadlock commented on Aug 18, 2026

    @justintadlock
  13. moved this from Ready to publish to Published (Done) in Developer Blog Content Boardon Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions