Easy SVG Pro developer reference
What developers can build on in Easy SVG Pro: hooks, the register function, Twig helpers, WP-CLI, the licence constant, and how features are switched on.
API status
Live uptime of the Updates, Downloads, Composer and Account APIs. Check here first when an update or a Composer install fails.
Easy SVG Pro is the agency layer on top of the free Easy SVG Support plugin: unlimited icon collections, icon sets, theme and folder sources, packs, WP-CLI, the SVG cleaner and integrations with page builders and field plugins. For developers it offers a small set of promised entry points, plus a larger set of internal ones you can read about but should not build on. This page explains which is which, how the licence and the feature switches decide what runs, and how to read the reference pages.
What you can build on
Hooks
Twelve filters and one action: icon sources, the Icon block, presets, import limits, the configurator and icon sets.
Register function
easy_svg_register_icon_collection() adds a collection from a theme, plugin or snippet.
Twig helpers
easy_svg_icon(), the easy_svg_icon filter and easy_svg_icon_exists() for Timber themes.
WP-CLI
Seven commands under wp easy-svg icons and wp easy-svg pack for CI, deploys and packs.
Licence constant
EASY_SVG_PRO_LICENSE_KEY in wp-config.php activates a site without typing the key.
Internal surfaces
The REST routes under easy-svg-pro/v1, the abilities, options and meta. Documented, not promised.
What is promised to stay
The plugin's readme has a section "For developers: the hooks", and the WP-CLI commands are named in its description. That is the line this reference follows.
| Status | What it covers | What it means for you |
|---|---|---|
| Stable | The hooks named in the readme, easy_svg_register_icon_collection(), the three Twig helpers, the seven WP-CLI commands and EASY_SVG_PRO_LICENSE_KEY | Names and behaviour stay. Build on these. |
| Internal | Everything else: the REST routes, the abilities, the remaining filters (easy_svg_pro_parse_manifest, easy_svg_pro_collection_icons, the source caps), options, post meta, the feature flags' storage and every namespaced function | Documented so you understand the plugin. They can change in any release. |
The readme is explicit about one family: the functions in includes/core/integration.php (the integration_ and icon_field_ functions) "exist; they are not promised".
Internal functions live in the namespace UWP\EasySvgPro. A rename does not raise an error in your code: function_exists() simply turns false and your feature quietly stops. Prefer the stable entry points, and when you must use an internal one, check for it every time.
Licence and feature switches
Two things decide whether a Pro surface is there: the site is activated with a licence, and the feature is switched on.
The licence. Activate the site under Icons → License, with your UnleashWP account or a licence key. Without an active licence the Pro features stay off.
The feature switches. Every Pro feature is off by default, even on a licensed site, and is switched on under Icons → Features. Sanitizing and hardening are not a switch; they always run.
The switches that decide whether a developer surface exists:
| Switch (Icons → Features) | Key | What it turns on for developers |
|---|---|---|
| Theme & folder sources | sources | assets/icons, drop-in folders, easy_svg_register_icon_collection() and the source filters |
| Multiple collections | collections | Handing collections to the core Icon block, easy_svg_pro_registered_icon |
| Icon set editor | editor | The easy_svg_set post type, sets as collections, the set routes, the set screen redirect |
| WP-CLI | cli | Every wp easy-svg subcommand |
| AI agent abilities | abilities | The four abilities (the set abilities also need Icon set editor) |
| Timber / Twig | twig | The three Twig helpers |
| Preset icon sets | presets | The preset catalogue and its two filters |
| Icon history | history | Revisions for sets, hooked to easy_svg_pro_set_icons_written |
The configurator and its filters (easy_svg_pro_dangerous_tags, easy_svg_pro_dangerous_attrs) need only the licence, not a switch. The import caps apply on every import path, whichever switch opened it. EASY_SVG_PRO_LICENSE_KEY and the Licence tab work on unlicensed sites, because that is how a site gets licensed.
There is no promised function to ask whether a switch is on. Write code that degrades: check function_exists() for what you call, and treat an empty icon or an empty list as "not available here".
Requirements
| Needs | Version |
|---|---|
| WordPress | 6.6 or newer |
| PHP | 8.2 or newer |
| Easy SVG Support | 4.3 or newer; bulk renaming in the free library and styles in the Icon block need 5.3.3 |
| Core Icon block with Pro collections | WordPress 7.1 (the icon registry) |
| Abilities | WordPress 6.9 (the Abilities API) |
| Timber helpers | Timber 1 (tested with 1.23.1) or Timber 2 |
When things run
Most Pro surfaces are wired on init. If your code depends on them, the order matters.
| Hook and priority | What happens |
|---|---|
plugins_loaded | Pro starts; a notice appears when the site is not activated |
init 8 | The easy_svg_set post type is registered (Icon set editor) |
init 9 | Published sets, the theme folder and drop-in folders fill the collection registry |
init 10 | The free library registers; call easy_svg_register_icon_collection() here |
init 11 | The registry is handed to the core Icon block (easy_svg_pro_registered_icon runs) |
init 20 | Icon history, block bindings and patterns |
timber/twig | The Twig helpers are added |
wp_abilities_api_init | The abilities are registered |
How to read a reference page
Every hand written item page has the same sections, in the same order:
- Header line: the kind (Filter, Action, Function, Twig function, WP-CLI command, Constant), the product and the status.
- A short plain introduction.
- Usage: the exact signature or synopsis, and where it is applied.
- When to use it: real situations, and when to reach for something else.
- Parameters: what each argument holds.
- Return value: what your callback must return, or what the command prints and its exit code.
- Default: the value when nobody changes anything.
- Examples: a basic case, a realistic agency case, and a defensive one that checks for the plugin first.
- How it works: what the code really does, in which order, behind which licence and switch, and what is cached.
- Pitfalls: mistakes taken from the code, with security notes in red boxes.
- Related: the neighbouring items and tutorials.
Pages for internal items are generated from the code and are shorter. They tell you what exists; they do not promise it stays.
Tutorials
Ship icons from a theme or plugin
Theme folders, drop-ins, manifest.json and the register function.
Automate with WP-CLI
Validate icons in CI, move packs between sites, check deploys.
REST API
The internal routes the panel uses, with authentication and gating.
Abilities for AI agents
Let an agent list, add and remove icons safely.
Timber and Twig
Draw icons in Twig and keep templates safe.
React to set changes
One action for every save, plus locks and revisions.
All stable items
Sources and collections
easy_svg_pro_source_dirs: the drop-in folders scanned as collections.easy_svg_pro_theme_collection_slug: the slug of the theme's own icon folder.easy_svg_register_icon_collection(): registers a collection from a folder or an array.
Icon block
easy_svg_pro_registered_icon: one icon's markup on its way to the core Icon block.
Presets
Import
easy_svg_pro_import_max_entries: entries read from one ZIP.easy_svg_pro_import_max_total_bytes: total bytes read from one ZIP.easy_svg_pro_import_font_max_bytes: the largest SVG font a set import reads.
Configurator
easy_svg_pro_dangerous_tags: element names the configurator refuses.easy_svg_pro_dangerous_attrs: attribute names the configurator refuses.
Sets
easy_svg_pro_set_screen_redirect: whether the set screen hands over to the library grid.easy_svg_pro_set_write_context: whether a request takes the set lock.easy_svg_pro_set_icons_written: fires after every save of a set's icons.
Twig
easy_svg_icon(): draws an icon in a Twig template.easy_svg_icon(filter): the same as a Twig filter.easy_svg_icon_exists(): checks whether an icon renders.
Constants
EASY_SVG_PRO_LICENSE_KEY: the licence key fromwp-config.php.
WP-CLI
wp easy-svg icons list: every collection with count, origin and problems.wp easy-svg icons problems: every file a folder could not use, and why.wp easy-svg icons validate: checks a folder of SVGs without importing.wp easy-svg icons import: copies a folder into a drop-in collection.wp easy-svg pack list: every collection that can be exported.wp easy-svg pack export: writes a collection as a pack ZIP.wp easy-svg pack import: reads a pack ZIP in as a new icon set.