GCBGutenberg
Control Blocks
Buy

Field type

icon

Visual picker over the WP 7.0+ icon registry. Authors pick from a searchable grid; storage is just the icon name. The server resolves to SVG at render time via WP_Icons_Registry.

Type: icon · Stored attribute type: object

Stored value

{ source: "wp", name: string }

Supports

  • Searchable grid of icons from the WP icon registry
  • Namespace filter — only show icons whose name starts with ${namespace}/
  • Explicit allow-list via filter for hand-curated subsets
  • Backwards-compat read of v1 dashicon values: { source: "dashicon", icon } still renders, but the picker only writes the new { source: "wp", name } shape.

Config options

OptionTypeDefaultDescription
namespacestringRestrict the picker to icons whose name starts with ${namespace}/. Forward-compat with WP 7.1's register_block_icon API.
filterstring[]Explicit allow-list of full icon names. Takes precedence over namespace. Use for hand-curated subsets per block.

Gotchas

  • Requires WP 7.0+. On older WP the REST endpoint 404s and the picker shows a "needs WordPress 7.0" message.
  • On vanilla WP 7.0 only core/* icons are registered; a namespace: "icomoon" filter is a no-op until something registers icons under that namespace.
  • Storage is just the name — render.php must call into the icon registry server-side to get the actual SVG. Don't store SVG content in post_content.

Example

JSON
{ "id": "ctrl_marker",
  "type": "icon",
  "label": "Bullet icon",
  "attributeKey": "marker",
  "namespace": "core",
  "parentPanelId": "panel" }

Every field also takes the keys common to all fields.

Built from GCB Lite 0.4.0 (ce232d4). Source: schemas/controls/icon.md.

Copyright © 2026 Runchain. WordPress is a trademark of the WordPress Foundation.