Dataesw_icon

esw_icon

The private post type that stores the icon library.

Post type · Easy SVG · Status: Internal · Defined in includes/icon-manager.php

Internal: not part of the promised public surface. It may change without notice.

Usage

register_post_type( 'esw_icon', ... )

Example

$ids = get_posts(
	array(
		'post_type'   => 'esw_icon',
		'post_status' => 'publish',
		'fields'      => 'ids',
		'numberposts' => 50,
	)
);

Description

Registered on init at priority 5, only when the icon library is on and WordPress has the icon registry. It is not public, not queryable, has no UI and no REST controller. post_name is the icon slug, post_title its label and post_content the sanitized, hardened SVG. Every capability maps to edit_theme_options and map_meta_cap is off. Use easy_svg_add_icon_result(), easy_svg_rename_icon() and easy_svg_update_icon_markup() to write it.

Do not write these posts with wp_insert_post() or wp_update_post() yourself: kses empties the SVG for users without unfiltered_html, the markup skips the sanitizer, and the cached list goes stale.