IconsReady-made icon packs for developers

Ready-made icon packs for developers

How Easy SVG Pro installs and stores ready-made packs, what a switched-off icon means technically, how updates behave and the import limits.

This page describes what happens behind the preset sets on Easy SVG → Templates. How to use it is in Ready-made icon packs.

The PHP functions on this page are internal: Easy SVG Pro uses them itself and they may change. For your own tools use the abilities (install a preset, update a preset, list presets) or the screen.

How an install runs

  1. Download. Pro downloads the ZIP the catalogue names and compares its size and checksum with the catalogue. On any difference it stops without writing anything.
  2. Import. The ZIP goes through the same reader an uploaded pack does: every SVG through Easy SVG's sanitizer, then hardened. Limits: 5000 entries, 16 MB of SVG in total, manifest.json at most 1 MB.
  3. Store. The result is a published icon set (its own post type) with its icons as JSON in post meta.

Where it lives, for backups and deploys: an installed pack is a post of type easy_svg_set with the meta keys below. Pro also keeps prepared files of every set under wp-content/uploads/easy-svg-pro/, so pages do not build the set again on each request. They are made from the post and rebuilt when a set is saved, so a database backup holds every pack and a file deploy cannot overwrite one. Nothing is written to the plugin or the theme. Updates are written into the same post. To list what is installed, use wp easy-svg icons list; to carry a pack to another site, export it under Easy SVG → Templates → Export or with wp easy-svg pack export.

What is stored on the set

Meta keyHolds
_easy_svg_set_iconsThe icons: name → {label, markup, keywords}
_easy_svg_pro_aboutLicense, author and source from the pack's manifest
_easy_svg_pro_preset{slug, version, hashes}: which pack, which version, one hash per icon as installed
_easy_svg_pro_hiddenList of switched-off icon names; absent when all are on
_easy_svg_pro_off'1' when the whole pack is switched off; absent otherwise

What "switched off" means technically

Switched-off icons and switched-off packs stay registered and are only no longer offered. So no page loses an icon it already shows.

PlaceSwitched off
easy_svg_icon(), shortcode, Twig, saved blocksstill renders
Core GET /wp/v2/icons/<name> (a placed Icon block)still renders
Core GET /wp/v2/icons (the inserter's list)left out
Easy SVG → Iconsleft out; a switched-off pack has no row
Icon fields (ACF, Meta Box and others)left out
Abilities list-icons, the inventoryleft out
Pack export and As a pluginleft out

For integrations inside the plugin: whatever offers icons reads read_set_icons_shown() or shown_collections( collections() ); whatever renders keeps reading read_set_icons() or the registry.

Updates

Pro offers an update when the catalogue names a version for an installed pack that version_compare() finds higher. A lower version is never offered. On an update:

  • An icon whose stored markup still matches its hash in _easy_svg_pro_preset gets the new drawing.
  • An icon somebody changed stays, and so do custom labels.
  • An icon deleted after install does not come back.
  • New icons are added. They are not in _easy_svg_pro_hidden, so they are on.
  • _easy_svg_pro_hidden and _easy_svg_pro_off are left alone.

Limits

FilterFor
easy_svg_pro_import_max_entriesMost entries read from one ZIP (default 5000).
easy_svg_pro_import_max_total_bytesMost SVG bytes read from one ZIP (default 16 MB).