Skip to content

WP_Icons_Registry: make Gutenberg-side iteration easier#11047

Draft
mcsf wants to merge 2 commits intoWordPress:trunkfrom
mcsf:add/icons-api/class-filters
Draft

WP_Icons_Registry: make Gutenberg-side iteration easier#11047
mcsf wants to merge 2 commits intoWordPress:trunkfrom
mcsf:add/icons-api/class-filters

Conversation

@mcsf
Copy link
Contributor

@mcsf mcsf commented Feb 25, 2026

Trac ticket: https://core.trac.wordpress.org/ticket/64651

Context: WordPress/gutenberg#75878

  • I'm fairly confident about the switch to protected visibility. It would be nice to include in 7.0 Beta.
  • I'm less so about introducing a filter. We don't have to rush that.
  • Unsolved: can we do anything Core-side to make it easier to replace WP_Icon_Registry entirely? (See comment.)

Trac ticket:

Use of AI Tools

None


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

mcsf added 2 commits February 25, 2026 17:31
This will make it easier to iterate on WP_Icons_Registry in Gutenberg by
allowing us to define derived classes (Gutenberg_Icons_Registry extends
WP_Icons_Registry) and inherit any methods or constants that are
untouched by referenced by the derived class.
This is so that the Gutenberg plugin can easily provide new core icons
in between major WordPress releases.

On the other hand, we will probably end up redefining whole methods on
the Gutenberg side as we improve WP_Icons_Registry, so it may be moot to
introduce a filter just for the manifest file.
@mcsf mcsf requested a review from t-hamano February 25, 2026 17:40
@github-actions
Copy link

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant