Skip to content

Icons Registry: Extend search to include label and keywords fields#76481

Open
manhar-addweb wants to merge 1 commit into
WordPress:trunkfrom
manhar-addweb:feature/icon-rest-api-keyword-search
Open

Icons Registry: Extend search to include label and keywords fields#76481
manhar-addweb wants to merge 1 commit into
WordPress:trunkfrom
manhar-addweb:feature/icon-rest-api-keyword-search

Conversation

@manhar-addweb
Copy link
Copy Markdown

@manhar-addweb manhar-addweb commented Mar 13, 2026

What?

Extends get_registered_icons() in WP_Icons_Registry to search
against label and keywords fields in addition to name.

Why?

Currently the search parameter only matches icon names.
Part of SVG Icon API iteration for WordPress 7.1.

Closes #75715

How?

Updated the search logic in get_registered_icons() to check
name, label, and keywords fields using stripos().

Testing Instructions

Updated the search logic in get_registered_icons() to check
name, label, and keywords fields using stripos().

Testing Instructions for Keyboard

Screenshots or screencast

Before After

Use of AI Tools

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 13, 2026

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.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @manhar@addwebsolution.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: manhar@addwebsolution.

Co-authored-by: im3dabasia <im3dabasia1@git.wordpress.org>
Co-authored-by: manhar-addweb <manhar@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: hiroshisatoy <hiroshisato@git.wordpress.org>
Co-authored-by: alexandrebuffet <alexandrebuffet@git.wordpress.org>
Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org>
Co-authored-by: mikemcalister <mmcalister@git.wordpress.org>
Co-authored-by: pbearne <pbearne@git.wordpress.org>
Co-authored-by: mrwweb <mrwweb@git.wordpress.org>
Co-authored-by: eric-michel <ytfeldrawkcab@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>

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

@github-actions github-actions Bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Mar 13, 2026
@github-actions
Copy link
Copy Markdown

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @manhar-addweb! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@manhar-addweb manhar-addweb force-pushed the feature/icon-rest-api-keyword-search branch 2 times, most recently from a800b50 to e7247eb Compare March 13, 2026 08:38
@manhar-addweb manhar-addweb force-pushed the feature/icon-rest-api-keyword-search branch from e7247eb to e2798f0 Compare March 13, 2026 08:39
@im3dabasia
Copy link
Copy Markdown
Contributor

Thank you for the PR, @manhar-addweb. This was actually addressed in #75878, which added search by label and was merged into trunk yesterday. It might be worth checking the latest trunk to see if the issue is already resolved.

@manhar-addweb
Copy link
Copy Markdown
Author

Thank you for the PR, @manhar-addweb. This was actually addressed in #75878, which added search by label and was merged into trunk yesterday. It might be worth checking the latest trunk to see if the issue is already resolved.

Thanks for the review! Closing this in favor of #75878.

@manhar-addweb
Copy link
Copy Markdown
Author

Thanks @im3dabasia

I checked #75878 - it covers label search only.

This PR also adds keywords field search as mentioned
in #75715:
"We could also reference the label field and an
optional keywords field."

I noticed the manifest.php does not have keywords yet.
I can extend this PR to:

  1. Add keywords support to manifest.php for core icons
  2. Update register() to accept keywords field

Should I proceed with this?

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Feature] Icons Related to Icon registration API and Icon REST API labels Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Icons Related to Icon registration API and Icon REST API First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SVG Icon API: Iteration for WordPress 7.1

3 participants