Skip to content

Icons: Add show_in_rest support to gate REST API exposure.#1

Closed
t-hamano wants to merge 3 commits into
64847-icons/snake-casefrom
64847-icons/expose-all-icons
Closed

Icons: Add show_in_rest support to gate REST API exposure.#1
t-hamano wants to merge 3 commits into
64847-icons/snake-casefrom
64847-icons/expose-all-icons

Conversation

@t-hamano

@t-hamano t-hamano commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Use of AI Tools

Used for: Initial code skeleton and test suggestions; final implementation and tests were reviewed and edited by me.

@github-actions

Copy link
Copy Markdown

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 wildworks.

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

@t-hamano t-hamano force-pushed the 64847-icons/snake-case branch from 07278a7 to a51f22e Compare June 11, 2026 06:43
t-hamano and others added 3 commits June 11, 2026 15:54
Align the icon registry and generated manifest with WordPress core's
snake_case array-key convention, which is the dominant style across core
PHP. This updates the manifest entries, the registry validation and
`get_content()` lookup, the allowed property keys, and the related
docblocks and error messages.

Mirrors the same rename made on the Gutenberg side in
WordPress/gutenberg#79100.

Co-Authored-By: Claude <noreply@anthropic.com>
Following the upstream Gutenberg rename of the icon manifest key from
filePath to file_path (WordPress/gutenberg#79100), adjust the
copy:icon-library-manifest Grunt task to match the new file_path key
when stripping the 'library/' path prefix, so regeneration keeps
producing valid icon paths.

Co-Authored-By: Claude <noreply@anthropic.com>
Introduce a `show_in_rest` icon property so that REST visibility can be
controlled independently from registry membership. The registry accepts
and validates the boolean property, while the REST controller filters
listings and single-icon requests to icons flagged for REST exposure.

This allows all manifest icons to be registered for internal use while
exposing only a subset through the public REST API.

Co-Authored-By: Claude <noreply@anthropic.com>
@t-hamano t-hamano force-pushed the 64847-icons/expose-all-icons branch from c20ed94 to df1868a Compare June 11, 2026 06:55
@t-hamano t-hamano closed this Jun 11, 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.

1 participant