Icons: Allow registering icons that are hidden from the REST API with public property - #13453
Icons: Allow registering icons that are hidden from the REST API with public property#13453fushar wants to merge 1 commit into
public property#13453Conversation
9618327 to
69d9e07
Compare
public property
Test using WordPress PlaygroundThe 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
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
69d9e07 to
c092f31
Compare
public propertypublic property
c092f31 to
3269507
Compare
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Trac ticket: https://core.trac.wordpress.org/ticket/66087.
Backport from WordPress/gutenberg#82634.
What
This PR allows an optional boolean
publicproperty to icon registration viawp_register_icon().Icons registered with
public: falsewill still be available throughwp_get_icon(), but the REST API will not return them, so they aren't exposed in the Icon block.As a back-compatibility, if we don't provide a
publicproperty, the default istrueand the behavior will be the same as the existing behavior.Here's a summary of the behavior:
wp_get_icon()publicomitted ortruepublic: falseUse of AI Tools
Used Claude Opus to generate the backported changes from the linked Gutenberg PR, then checked the changes myself.