Spectre Icons is the standalone PHCDevworks WordPress plugin product for
expanding native icon library support in builders through manifest-driven
registration, inline SVG rendering, and builder-aware integration.
Maintained by PHCDevworks, it is focused on solving a specific product problem: builder icon libraries are limited, fragmented, and often spread across multiple plugins. Spectre Icons keeps icon-library expansion centralized in one plugin while preserving clean rendering, reliable registration, and room for additional builder support over time.
Contributing | Changelog | Security Policy | WordPress Plugin Directory
- Registers curated icon libraries from JSON manifests instead of scattering builder-specific icon definitions throughout the codebase
- Integrates icon libraries directly into Elementor with builder-aware library registration and picker support
- Renders icons as inline SVG for frontend and editor consistency
- Supports theme-friendly color inheritance and builder color controls
- Includes branding-aware rendering support for social icon workflows
- Lets site owners enable or disable bundled icon libraries from plugin settings
- Keeps architecture modular so future builder support can be added cleanly
Install from the WordPress plugin directory and activate the plugin:
- Go to
Plugins -> Add New - Search for
Spectre Icons - Click
Install Now - Activate the plugin
- Open
Settings -> Spectre Icons
Upload the plugin ZIP through the WordPress admin, then activate it:
- Download the plugin ZIP
- Go to
Plugins -> Add New -> Upload Plugin - Upload the ZIP file
- Activate the plugin
- Open
Settings -> Spectre Icons
Clone the repository into your WordPress plugins directory or symlink it into
wp-content/plugins/, then lint the PHP before testing:
composer update
bin/lint-php.shGo to Settings -> Spectre Icons and enable the icon libraries you want to
expose in supported builders.
Open any Elementor widget that supports icons and choose a Spectre Icons tab from the picker.
Current builder support:
- Elementor 3.x+
Typical supported Elementor icon workflows include:
- Icon
- Icon Box
- Icon List
- Social Icons
Icons inherit color cleanly through builder controls and frontend styling. Where builder workflows support it, branding-aware icon output can be used for official social icon presentation.
Lucide IconsFont Awesome Free
The bundled packs are treated as locked source assets in this repository. Registration, manifest handling, rendering behavior, and admin controls can evolve, but the SVG source files themselves are not intended to be edited as part of normal plugin work.
- Plugin bootstrap and package structure
- Builder integration logic
- Icon library registration
- Manifest loading and validation
- Inline SVG rendering behavior
- Admin settings and library enable/disable controls
- Editor preview integration
- Compatibility improvements for supported and future builders
The plugin is organized around these responsibilities:
spectre-icons.phpbootstraps the plugin and loads integration codeincludes/elementor/contains Elementor-specific registration, rendering, settings, and integration hooksassets/manifests/contains the manifest files used as the registration source for bundled librariesassets/iconpacks/contains the locked bundled icon assetsassets/js/contains editor and frontend preview behaviorassets/css/contains icon styling and color-related behavior
- General design-system infrastructure
- Broader Spectre system architecture
- Unrelated builder features outside icon-library support
- Theme framework behavior
- Component-library delivery outside icon concerns
Spectre Icons is a focused product. Its job is to expand builder icon libraries cleanly, not to become a general WordPress UI framework.
The runtime flow is intentionally simple:
- Bundled icon packs are indexed through JSON manifests in
assets/manifests/ - Builder integration registers those manifests as available icon libraries
- The renderer resolves icon slugs from registered manifests
- Icons are output as inline SVG in supported editor and frontend contexts
- Styles and scripts handle preview behavior, color inheritance, and builder UX
- WordPress 6.0+
- PHP 7.4+
- Elementor 3.x+ for current active builder support
The plugin is designed to preserve existing Elementor support first and make future builder support additive rather than destructive.
Lint PHP:
bin/lint-php.shKey source areas:
spectre-icons.phpfor plugin bootstrap and core loadingincludes/elementor/for Elementor integrationincludes/class-spectre-icons-svg-sanitizer.phpfor SVG sanitization logicassets/manifests/for bundled library manifestsassets/js/for editor and frontend injection behaviorassets/css/for icon styling
Fast PHP coverage now lives under tests/phpunit/ and exercises the
manifest-driven plugin seams without needing a full WordPress boot:
composer update
composer testThat suite covers icon library preferences, manifest-backed registration, renderer output, SVG sanitization, Elementor tab registration, and preview asset config generation.
The Playwright smoke test remains the real editor-path check for preview behavior:
npm install
npm run test:e2e:smokeBrowser coverage is organized by product area so future builder integrations can slot in alongside Elementor cleanly:
tests/e2e/main/for shared product/admin behaviortests/e2e/elementor/for Elementor-specific picker and preview flowstests/e2e/support/for shared Playwright helpers
Useful browser commands:
npm run test:e2e:mainnpm run test:e2e:elementornpm run test:e2e:smoke
Optional Playwright environment variables:
SPECTRE_E2E_BASE_URLSPECTRE_E2E_ADMIN_USERSPECTRE_E2E_ADMIN_PASSWORD
When changing builder integration or rendering behavior, validate the real user path:
- plugin activation works cleanly
- icon libraries still register correctly
- enabled and disabled library controls behave correctly
- Elementor picker integration still works
- icons render in both editor and frontend
- no bundled libraries disappear unexpectedly
PHCDevworks maintains this repository as a focused WordPress plugin product.
When contributing:
- keep scope centered on icon-library expansion for builders
- treat bundled icon pack SVG files as locked source assets
- prefer manifest-driven registration over scattered hardcoded builder logic
- preserve backward compatibility where reasonably possible
- validate builder-facing behavior when changing integration code
See CONTRIBUTING.md for the full workflow.
The plugin code is licensed under GPL-2.0-or-later. See LICENSE.
Bundled icon libraries retain their own upstream licenses:
Lucideis licensed under ISCFont Awesome Freeicons are licensed under CC BY 4.0 and related code is licensed under MIT