Icons library: Add WP_Icons_Registry, core icon set and REST endpoint
Introduces a registry class to mediate access to a library of SVG icons. These
icons can be queried by directly interfacing with the singleton class
WP_Icons_Registry, or via the REST API using the following GET endpoints:
- /wp/v2/icons
- /wp/v2/icons/$name, e.g. /wp/v2/icons/core/audio
Modifies the Gutenberg-to-Core copy process to copy from @wordpress/icons:
- the icons (SVG files) to
wp-includes/icons/library/*.svg
- the manifest file to
wp-includes/icons/manifest.php
For 7.0, the registry remains closed to third-party icons, serving only core
icons per the manifest file.
Together, these APIs power the new Icon block.
Developed in https://github.com/WordPress/gutenberg/pull/72215
Developed in https://github.com/WordPress/gutenberg/pull/74943
Developed in https://github.com/WordPress/wordpress-develop/pull/10909
Props mcsf, wildworks, fabiankaegy, joen, jorgefilipecosta, ntsekouras.
Fixes #64651.