Skip to content

WP_Icons_Registry: make Gutenberg-side iteration easier#11047

Closed
mcsf wants to merge 4 commits intoWordPress:trunkfrom
mcsf:add/icons-api/class-filters
Closed

WP_Icons_Registry: make Gutenberg-side iteration easier#11047
mcsf wants to merge 4 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.

mcsf added 2 commits February 26, 2026 10:46
We can think about this later on. I don't want to expose things
unnecessarily, but still wanted to show the concept.

This reverts commit 40dba1d.
@mcsf mcsf marked this pull request as ready for review February 26, 2026 11:39
@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props mcsf.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano
Copy link
Contributor

This PR was committed in changeset 61748.

@t-hamano t-hamano closed this Feb 26, 2026
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.

2 participants