CC SVG Sprite Manager
CC SVG Sprite Manager is a WordPress plugin for managing SVG source icons and generating an SVG sprite.
by Chance Lin · github.com/cclintw/cc-svg-sprite-manager · website
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/cclintw/cc-svg-sprite-manager/archive/refs/heads/main.zipReadme
CC SVG Sprite Manager
CC SVG Sprite Manager is a WordPress plugin for managing SVG source icons and generating an SVG sprite.
Features
- Upload a single SVG file or select up to 100 SVG files at a time.
- Validate each selected file before uploading and automatically send files in small batches.
- Store uploaded source SVG icons in
assets/sprite/icons/inside the plugin directory. - Generate
assets/sprite/cc-icons-sprite.svginside the plugin directory. - Generate
assets/sprite/cc-icons-sprite.txtinside the plugin directory. - Sync a copy of
cc-icons-sprite.svgto the active themeassets/images/directory. - Generate
cc-icons-sprite.txtin the themeassets/images/directory with icon list and usage notes. - Preserve existing icons when importing new SVG files.
- Handle duplicate filenames by overwriting, skipping, or renaming to
name-1.svg,name-2.svg, and so on. - Preview existing icons in the WordPress admin.
- Delete selected source icons and regenerate the sprite.
- Select or deselect all icons with one toggle button.
- Use the
[icon]shortcode to render an icon from the generated sprite.
Usage
- Activate the plugin.
- Open Tools > CC SVG Sprite Manager in the WordPress admin menu.
- Upload up to 100 SVG files.
- Use the generated
wp-content/themes/classic-x/assets/images/cc-icons-sprite.svgfrom your theme, or use the[icon]shortcode.
Example:
[icon name="search" class="icon icon--search" size="24"]
File Locations
- Source icons:
wp-content/plugins/cc-svg-sprite-manager/assets/sprite/icons/ - Plugin sprite:
wp-content/plugins/cc-svg-sprite-manager/assets/sprite/cc-icons-sprite.svg - Plugin handoff note:
wp-content/plugins/cc-svg-sprite-manager/assets/sprite/cc-icons-sprite.txt - Theme-readable sprite copy:
wp-content/themes/classic-x/assets/images/cc-icons-sprite.svg - Theme handoff note:
wp-content/themes/classic-x/assets/images/cc-icons-sprite.txt
The plugin intentionally leaves the theme copy in place on uninstall so a theme can keep reading it after the plugin is removed.
License
GPLv2 or later.