JMR.codes Phosphor Icons GitLab
Utility plugin that registers the Phosphor icons with the WordPress Icons API. Each icon weight is a separate collection which can be accessed via the Gutenberg block editor or via `wp_get_icon()`
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitLab with WP-CLI:
wp plugin install https://gitlab.com/jmr-wordpress/phosphor-icon-collection/-/archive/main/phosphor-icon-collection-main.zipAdds the Phosphor icon set to the WordPress icon library, one collection per weight.
Description
Registers the 1,512 Phosphor Icons (https://phosphoricons.com) with the WordPress Icons API, so they appear in the Icon block's library and can be rendered with wp_get_icon().
Each weight is its own collection:
phosphor-thinphosphor-lightphosphor(regular)phosphor-boldphosphor-fillphosphor-duotone
Icons are named <collection>/<icon>, e.g. phosphor-bold/arrow-right:
echo wp_get_icon( 'phosphor-duotone/heart', array( 'size' => 32 ) );
Icons inherit the current text colour. Duotone icons draw their secondary layer at 20% of the current colour.
To register only some weights, filter jmrcodes_phosphor_icons_collections:
add_filter( 'jmrcodes_phosphor_icons_collections', function ( $collections ) {
return array_intersect_key( $collections, array_flip( array( 'phosphor', 'phosphor-fill' ) ) );
} );
Updating the icons
npm pack @phosphor-icons/core && tar xzf phosphor-icons-core-*.tgz
php bin/build-icons.php package
Credits
Phosphor Icons by Helena Zhang and Tobias Fried, MIT licensed (see icons/LICENSE).
Changelog
1.0.0
- Initial release, bundling @phosphor-icons/core 2.1.1.
Releases
1 release.
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.
GitLab does not publish per-asset download counts, so this plugin ranks on stars and activity only.