Skip to main content

Option Types — functions

53 public functions. 53 are 🔌 pluggable (function_exists()-guarded, so a theme/child can override them).

FunctionSummary
fw_fa4_to_fa6Rewrites a legacy Font Awesome 4 class string to its FA6 equivalent, leaving non-FA4 classes untouched.
fw_icon_animated_enabledWhether the "Animated" tab shows at all — i.e. at least one player-based technology (Lottie or Rive) is enabled. Derived from the per-technology gates, so the tab appears when either is on and hides when both are off. Core ships the tab, JS handlers and bundled players but keeps them OFF by default; the opt-in Animated Icons extension flips the per-technology gates. The FRONTEND render of already-saved animated values is intentionally NOT gated, so toggling the extension never breaks pages that already use one.
fw_icon_lottie_dir{ path, url } of the Lottie upload dir (uploads/unysonplus/lottie).
fw_icon_lottie_enabledWhether the Lottie technology is enabled (its Animated-tab panel, admin player runtime and .json upload endpoint). Default OFF; the Animated Icons extension flips it on from its "Lottie" toggle.
fw_icon_lucide_allAll Lucide icon names (sorted), for the picker grid.
fw_icon_lucide_dataLoad + cache the name → inner-markup map.
fw_icon_lucide_markupResolve a Lucide icon name to complete inline <svg> markup (currentColor, so it inherits the surrounding text colour). Returns '' for an unknown name. The markup still passes through sc_icon_sanitize_svg() at render.
fw_icon_lucide_searchNames matching a query against name + keywords. Empty query → all names.
fw_icon_lucide_search_dataLoad + cache the name → keyword-string map (for picker search).
fw_icon_pack__fetch_jsonGET a URL and json_decode it. Returns array|WP_Error.
fw_icon_pack__from_icomoonIf $decoded is an IcoMoon selection.json export, convert it to our self-describing { title, svg_open, icons:{ name => inner-markup } } shape; otherwise return null (so the caller treats it as one of our native formats).
fw_icon_pack__keywordsSearch keywords for an icon name: the name plus its tokens, deduped.
fw_icon_pack__normalize_openClean an <svg …> opening tag: drop noise attrs, force colours to currentColor.
fw_icon_pack__rrmdirRecursively delete a directory (used for temp + uninstall).
fw_icon_pack__unique_slugA slug not already used by a bundled/installed/font/catalog pack.
fw_icon_pack__write_packAtomically write a pack's three JSON files into the install dir.
fw_icon_pack_ajax_nonceReturns the nonce action name used for icon-pack management AJAX requests.
fw_icon_pack_catalogFetch + decode the remote catalog, cached in a transient (12h) so the installer UI is snappy and we don't hammer the CDN. Returns the decoded catalog array, or an empty shape on failure.
fw_icon_pack_catalog_urlURL of the catalog.json describing installable packs. Filterable so the host can point at a mirror/CDN. Default: the raw GitHub content of the icon-packs repo.
fw_icon_pack_countsGlyph counts for the ALWAYS-PRESENT libraries: the webfont packs and the bundled SVG sets (Lucide/Tabler). Both are static (they don't change between plugin versions), and computing them is costly — font counts parse each pack's CSS, bundled-SVG counts decode a multi-MB JSON — so the result is cached in a per-version transient and a per-request static. Installed packs are excluded (their count is read cheaply from meta.json in the payload).
fw_icon_pack_enabled_map{ pack_id => bool } saved map. Empty array = never curated (all enabled).
fw_icon_pack_enabled_option_keyReturns the per-theme option key storing which icon packs are enabled for the picker.
fw_icon_pack_installDownload one pack from the catalog into the uploads install dir. Fetches the two data JSONs (icons + search) from the catalog base_url and writes them plus a meta.json. Atomic-ish: writes into a temp dir, then renames into place, so a half-downloaded pack never registers as installed.
fw_icon_pack_install_from_jsonInstall a user-uploaded icon pack from a JSON string. Accepts either a flat map { name => markup } or a self-describing { title, svg_open, icons:{…} }. Each icon's markup may be a full <svg>…</svg> or just the inner paths; both are sanitised (wp_kses SVG allowlist — strips <script>, on* handlers, etc.), reduced to inner markup, and stripped of hardcoded colours so they inherit currentColor. Writes the same three-file pack shape as a catalog install, tagged origin:"custom".
fw_icon_pack_installed_metaDecoded meta.json for one installed pack, or null.
fw_icon_pack_installed_slugsSlugs of packs installed under uploads (each a dir with a valid meta.json + icons.json).
fw_icon_pack_installer_packsData the unified installer panel needs. One flat packs list, each entry: { slug, title, type:'font'|'svg', state:'bundled'|'installed'|'available', enabled:bool, count:int } covering the bundled webfonts (toggle only), bundled + installed SVG libraries (toggle + Remove for installed), and catalog packs available to install. Bundled icon counts are omitted (counting them would decode the multi-MB bundles on a settings-page load); installed/available counts are cheap.
fw_icon_pack_installer_payloadBuilds the data payload (AJAX URL, nonce, packs, i18n) for the icon-pack installer UI.
fw_icon_pack_set_enabledFlip one pack on/off and persist. Seeds an all-enabled map on first write.
fw_icon_pack_uninstallRemove an installed pack. Bundled packs (lucide/tabler) can't be uninstalled — they have no dir under uploads, so this is a no-op error for them.
fw_icon_raster_enabledWhether animated raster icons (GIF / APNG / WebP) are surfaced as a supported technology. These already upload + render through the normal image path (an <img> the browser animates natively), so this flag does NOT gate functionality — it only controls the picker hint that points authors at the capability. Default OFF; the Animated Icons extension turns it on from its "Animated raster" toggle.
fw_icon_rive_dir{ path, url } of the Rive upload dir (uploads/unysonplus/rive).
fw_icon_rive_enabledWhether the Rive technology is enabled (its Animated-tab panel, admin canvas runtime and .riv upload endpoint). Default OFF; the Animated Icons extension flips it on from its "Rive" toggle.
fw_icon_svg_animation_enabledWhether SVG icons may keep their SMIL animation (&lt;animate&gt;, &lt;animateTransform&gt;, …). Default OFF — the SVG sanitizer strips animation tags, so an animated SVG still renders but static. The Animated Icons extension flips this on from its "Animated SVG" toggle. SMIL is declarative (it cannot run JavaScript), and the XSS surface — scripts, event handlers, <foreignObject>, external refs — stays excluded either way.
fw_icon_svg_pack_allAll icon names in a pack (sorted).
fw_icon_svg_pack_availableTrue when a pack has bundled data (used to gate the settings + picker). Checks the data file's presence + non-emptiness on disk rather than json-decoding it — availability is queried on every builder page load, so decoding a multi-megabyte set (e.g. Tabler ~1.2 MB) here would be wasteful.
fw_icon_svg_pack_dataname => inner-markup map for a pack (cached; empty if the file is absent).
fw_icon_svg_pack_fileResolve a pack data file to a readable path, checking the BUNDLED data/ dir first, then the INSTALLED uploads dir. This is what lets a pack be shipped in the plugin OR downloaded on demand and still resolve transparently.
fw_icon_svg_pack_install_dirAbsolute path of the on-demand icon-pack install root, where the installer writes packs fetched from the remote catalog (one sub-dir per pack: unysonplus-icon-packs/<slug>/<slug>-icons.json + -search.json). Lives under wp-content/uploads so it survives plugin updates and never bloats the plugin.
fw_icon_svg_pack_markupResolve a 'pack/name' id (e.g. 'lucide/star', 'tabler/home') to full inline <svg> markup with currentColor. Returns '' for an unknown pack/name. The markup still passes through sc_icon_sanitize_svg() at render.
fw_icon_svg_pack_registryid => { title, slug, svg_open }. Filterable so more packs can be added.
fw_icon_svg_pack_searchNames in a pack matching a query (name + keywords). Empty query → first slice.
fw_icon_svg_pack_search_dataReturns the cached search index data for an SVG icon pack, loaded from its bundled JSON file.
fw_option_type_background_pro_force_admin_enqueueForce-load the background-pro assets on post-edit screens.
fw_option_type_responsive_force_admin_enqueueForce-load the device-tabs + responsive assets on post-edit screens.
fw_option_type_spacing_force_admin_enqueueForce-load the spacing assets on post-edit screens.
unysonplus_all_icon_pack_idsReturns the ids of all available icon packs.
unysonplus_any_font_pack_enabledTrue if at least one webfont pack is enabled (gates the Icon Fonts tab).
unysonplus_enabled_icon_packsIds of the enabled packs. Defaults to ALL when the setting was never saved (existing sites are unchanged) and never returns empty (falls back to all), so a stray "uncheck everything" can't blank the picker entirely.
unysonplus_font_icon_pack_idsIds of the webfont packs (Dashicons, Font Awesome, Entypo, …).
unysonplus_icon_pack_choicesEvery selectable pack: id => label (font packs first, then SVG libraries).
unysonplus_icon_pack_enabledReturns whether the given icon pack id is currently enabled.
unysonplus_svg_icon_pack_idsIds of the bundled inline-SVG libraries that actually have data present. Derived from the multi-pack registry so a new pack (Tabler, …) appears everywhere just by dropping in its JSON + a registry entry.

fw_fa4_to_fa6

🔌 pluggable

fw_fa4_to_fa6( $class )

Rewrites a legacy Font Awesome 4 class string to its FA6 equivalent, leaving non-FA4 classes untouched.

Source: framework/includes/option-types/icon/includes/fa-migrate.php:20

fw_icon_animated_enabled

🔌 pluggable

fw_icon_animated_enabled()

Whether the "Animated" tab shows at all — i.e. at least one player-based technology (Lottie or Rive) is enabled. Derived from the per-technology gates, so the tab appears when either is on and hides when both are off. Core ships the tab, JS handlers and bundled players but keeps them OFF by default; the opt-in Animated Icons extension flips the per-technology gates. The FRONTEND render of already-saved animated values is intentionally NOT gated, so toggling the extension never breaks pages that already use one.

Source: framework/includes/option-types/icon/includes/pack-installer.php:917

fw_icon_lottie_dir

🔌 pluggable

fw_icon_lottie_dir()

{ path, url } of the Lottie upload dir (uploads/unysonplus/lottie).

Source: framework/includes/option-types/icon/includes/pack-installer.php:954

fw_icon_lottie_enabled

🔌 pluggable

fw_icon_lottie_enabled()

Whether the Lottie technology is enabled (its Animated-tab panel, admin player runtime and .json upload endpoint). Default OFF; the Animated Icons extension flips it on from its "Lottie" toggle.

Source: framework/includes/option-types/icon/includes/pack-installer.php:889

fw_icon_lucide_all

🔌 pluggable

fw_icon_lucide_all()

All Lucide icon names (sorted), for the picker grid.

Source: framework/includes/option-types/icon/includes/lucide.php:74

fw_icon_lucide_data

🔌 pluggable

fw_icon_lucide_data()

Load + cache the name → inner-markup map.

Source: framework/includes/option-types/icon/includes/lucide.php:21

fw_icon_lucide_markup

🔌 pluggable

fw_icon_lucide_markup( $name )

Resolve a Lucide icon name to complete inline <svg> markup (currentColor, so it inherits the surrounding text colour). Returns '' for an unknown name. The markup still passes through sc_icon_sanitize_svg() at render.

Source: framework/includes/option-types/icon/includes/lucide.php:57

🔌 pluggable

fw_icon_lucide_search( $query, $limit = 120 )

Names matching a query against name + keywords. Empty query → all names.

ParameterTypeDescription
$querystring
$limitintMax results (0 = no limit).

Source: framework/includes/option-types/icon/includes/lucide.php:87

fw_icon_lucide_search_data

🔌 pluggable

fw_icon_lucide_search_data()

Load + cache the name → keyword-string map (for picker search).

Source: framework/includes/option-types/icon/includes/lucide.php:37

fw_icon_pack__fetch_json

🔌 pluggable

fw_icon_pack__fetch_json( $url )

GET a URL and json_decode it. Returns array|WP_Error.

Source: framework/includes/option-types/icon/includes/pack-installer.php:582

fw_icon_pack__from_icomoon

🔌 pluggable

fw_icon_pack__from_icomoon( $decoded )

If $decoded is an IcoMoon selection.json export, convert it to our self-describing { title, svg_open, icons:{ name => inner-markup } } shape; otherwise return null (so the caller treats it as one of our native formats).

IcoMoon signature: an icons LIST (numeric keys) whose entries carry icon.paths, optionally alongside an IcoMoonType marker. Paths live in the project's coordinate space (height, default 1024), standard SVG top-left origin. Per-icon width may differ (non-square glyphs) — those get a centring translate so they sit correctly inside the square viewBox the pack declares.

ParameterTypeDescription
$decodedarray

Returns array\|null

Source: framework/includes/option-types/icon/includes/pack-installer.php:429

fw_icon_pack__keywords

🔌 pluggable

fw_icon_pack__keywords( $name )

Search keywords for an icon name: the name plus its tokens, deduped.

Source: framework/includes/option-types/icon/includes/pack-installer.php:487

fw_icon_pack__normalize_open

🔌 pluggable

fw_icon_pack__normalize_open( $open )

Clean an <svg …> opening tag: drop noise attrs, force colours to currentColor.

Source: framework/includes/option-types/icon/includes/pack-installer.php:499

fw_icon_pack__rrmdir

🔌 pluggable

fw_icon_pack__rrmdir( $dir )

Recursively delete a directory (used for temp + uninstall).

Source: framework/includes/option-types/icon/includes/pack-installer.php:597

fw_icon_pack__unique_slug

🔌 pluggable

fw_icon_pack__unique_slug( $base )

A slug not already used by a bundled/installed/font/catalog pack.

Source: framework/includes/option-types/icon/includes/pack-installer.php:535

fw_icon_pack__write_pack

🔌 pluggable

fw_icon_pack__write_pack( $slug, $icons, $search, $meta )

Atomically write a pack's three JSON files into the install dir.

Source: framework/includes/option-types/icon/includes/pack-installer.php:554

fw_icon_pack_ajax_nonce

🔌 pluggable

fw_icon_pack_ajax_nonce()

Returns the nonce action name used for icon-pack management AJAX requests.

Source: framework/includes/option-types/icon/includes/pack-installer.php:612

fw_icon_pack_catalog

🔌 pluggable

fw_icon_pack_catalog( $force = false )

Fetch + decode the remote catalog, cached in a transient (12h) so the installer UI is snappy and we don't hammer the CDN. Returns the decoded catalog array, or an empty shape on failure.

ParameterTypeDescription
$forceboolBypass the transient (used by an explicit "refresh").

Returns array { version:int, base_url:string, packs:{ slug => {title,slug,svg_open,count} } }

Source: framework/includes/option-types/icon/includes/pack-installer.php:50

fw_icon_pack_catalog_url

🔌 pluggable

fw_icon_pack_catalog_url()

URL of the catalog.json describing installable packs. Filterable so the host can point at a mirror/CDN. Default: the raw GitHub content of the icon-packs repo.

Source: framework/includes/option-types/icon/includes/pack-installer.php:32

fw_icon_pack_counts

🔌 pluggable

fw_icon_pack_counts()

Glyph counts for the ALWAYS-PRESENT libraries: the webfont packs and the bundled SVG sets (Lucide/Tabler). Both are static (they don't change between plugin versions), and computing them is costly — font counts parse each pack's CSS, bundled-SVG counts decode a multi-MB JSON — so the result is cached in a per-version transient and a per-request static. Installed packs are excluded (their count is read cheaply from meta.json in the payload).

Returns array pack_id => int

Source: framework/includes/option-types/icon/includes/pack-installer.php:149

fw_icon_pack_enabled_map

🔌 pluggable

fw_icon_pack_enabled_map()

{ pack_id => bool } saved map. Empty array = never curated (all enabled).

Source: framework/includes/option-types/icon/includes/pack-installer.php:637

fw_icon_pack_enabled_option_key

🔌 pluggable

fw_icon_pack_enabled_option_key()

Returns the per-theme option key storing which icon packs are enabled for the picker.

Source: framework/includes/option-types/icon/includes/pack-installer.php:628

fw_icon_pack_install

🔌 pluggable

fw_icon_pack_install( $slug )

Download one pack from the catalog into the uploads install dir. Fetches the two data JSONs (icons + search) from the catalog base_url and writes them plus a meta.json. Atomic-ish: writes into a temp dir, then renames into place, so a half-downloaded pack never registers as installed.

ParameterTypeDescription
$slugstring

Returns true\|WP_Error

Source: framework/includes/option-types/icon/includes/pack-installer.php:223

fw_icon_pack_install_from_json

🔌 pluggable

fw_icon_pack_install_from_json( $title, $json_raw )

Install a user-uploaded icon pack from a JSON string. Accepts either a flat map { name => markup } or a self-describing { title, svg_open, icons:{…} }. Each icon's markup may be a full <svg>…</svg> or just the inner paths; both are sanitised (wp_kses SVG allowlist — strips <script>, on* handlers, etc.), reduced to inner markup, and stripped of hardcoded colours so they inherit currentColor. Writes the same three-file pack shape as a catalog install, tagged origin:"custom".

ParameterTypeDescription
$titlestringPack name (falls back to the JSON's own title).
$json_rawstringRaw uploaded file contents.

Returns array\|WP_Error { slug, count } on success.

Source: framework/includes/option-types/icon/includes/pack-installer.php:326

fw_icon_pack_installed_meta

🔌 pluggable

fw_icon_pack_installed_meta( $slug )

Decoded meta.json for one installed pack, or null.

Source: framework/includes/option-types/icon/includes/pack-installer.php:129

fw_icon_pack_installed_slugs

🔌 pluggable

fw_icon_pack_installed_slugs()

Slugs of packs installed under uploads (each a dir with a valid meta.json + icons.json).

Source: framework/includes/option-types/icon/includes/pack-installer.php:110

fw_icon_pack_installer_packs

🔌 pluggable

fw_icon_pack_installer_packs()

Data the unified installer panel needs. One flat packs list, each entry: { slug, title, type:'font'|'svg', state:'bundled'|'installed'|'available', enabled:bool, count:int } covering the bundled webfonts (toggle only), bundled + installed SVG libraries (toggle + Remove for installed), and catalog packs available to install. Bundled icon counts are omitted (counting them would decode the multi-MB bundles on a settings-page load); installed/available counts are cheap.

Source: framework/includes/option-types/icon/includes/pack-installer.php:730

fw_icon_pack_installer_payload

🔌 pluggable

fw_icon_pack_installer_payload()

Builds the data payload (AJAX URL, nonce, packs, i18n) for the icon-pack installer UI.

Source: framework/includes/option-types/icon/includes/pack-installer.php:804

fw_icon_pack_set_enabled

🔌 pluggable

fw_icon_pack_set_enabled( $slug, $on )

Flip one pack on/off and persist. Seeds an all-enabled map on first write.

Source: framework/includes/option-types/icon/includes/pack-installer.php:655

fw_icon_pack_uninstall

🔌 pluggable

fw_icon_pack_uninstall( $slug )

Remove an installed pack. Bundled packs (lucide/tabler) can't be uninstalled — they have no dir under uploads, so this is a no-op error for them.

ParameterTypeDescription
$slugstring

Returns true\|WP_Error

Source: framework/includes/option-types/icon/includes/pack-installer.php:297

fw_icon_raster_enabled

🔌 pluggable

fw_icon_raster_enabled()

Whether animated raster icons (GIF / APNG / WebP) are surfaced as a supported technology. These already upload + render through the normal image path (an <img> the browser animates natively), so this flag does NOT gate functionality — it only controls the picker hint that points authors at the capability. Default OFF; the Animated Icons extension turns it on from its "Animated raster" toggle.

Source: framework/includes/option-types/icon/includes/pack-installer.php:946

fw_icon_rive_dir

🔌 pluggable

fw_icon_rive_dir()

{ path, url } of the Rive upload dir (uploads/unysonplus/rive).

Source: framework/includes/option-types/icon/includes/pack-installer.php:1006

fw_icon_rive_enabled

🔌 pluggable

fw_icon_rive_enabled()

Whether the Rive technology is enabled (its Animated-tab panel, admin canvas runtime and .riv upload endpoint). Default OFF; the Animated Icons extension flips it on from its "Rive" toggle.

Source: framework/includes/option-types/icon/includes/pack-installer.php:901

fw_icon_svg_animation_enabled

🔌 pluggable

fw_icon_svg_animation_enabled()

Whether SVG icons may keep their SMIL animation (&lt;animate&gt;, &lt;animateTransform&gt;, …). Default OFF — the SVG sanitizer strips animation tags, so an animated SVG still renders but static. The Animated Icons extension flips this on from its "Animated SVG" toggle. SMIL is declarative (it cannot run JavaScript), and the XSS surface — scripts, event handlers, <foreignObject>, external refs — stays excluded either way.

Source: framework/includes/option-types/icon/includes/pack-installer.php:931

fw_icon_svg_pack_all

🔌 pluggable

fw_icon_svg_pack_all( $pack, $limit = 0 )

All icon names in a pack (sorted).

Source: framework/includes/option-types/icon/includes/svg-packs.php:170

fw_icon_svg_pack_available

🔌 pluggable

fw_icon_svg_pack_available( $pack )

True when a pack has bundled data (used to gate the settings + picker). Checks the data file's presence + non-emptiness on disk rather than json-decoding it — availability is queried on every builder page load, so decoding a multi-megabyte set (e.g. Tabler ~1.2 MB) here would be wasteful.

Source: framework/includes/option-types/icon/includes/svg-packs.php:126

fw_icon_svg_pack_data

🔌 pluggable

fw_icon_svg_pack_data( $pack )

name => inner-markup map for a pack (cached; empty if the file is absent).

Source: framework/includes/option-types/icon/includes/svg-packs.php:81

fw_icon_svg_pack_file

🔌 pluggable

fw_icon_svg_pack_file( $slug, $kind )

Resolve a pack data file to a readable path, checking the BUNDLED data/ dir first, then the INSTALLED uploads dir. This is what lets a pack be shipped in the plugin OR downloaded on demand and still resolve transparently.

ParameterTypeDescription
$slugstringe.g. 'lucide'
$kindstring'icons' | 'search'

Returns string Readable absolute path, or '' if the pack isn't present anywhere.

Source: framework/includes/option-types/icon/includes/svg-packs.php:66

fw_icon_svg_pack_install_dir

🔌 pluggable

fw_icon_svg_pack_install_dir()

Absolute path of the on-demand icon-pack install root, where the installer writes packs fetched from the remote catalog (one sub-dir per pack: unysonplus-icon-packs/<slug>/<slug>-icons.json + -search.json). Lives under wp-content/uploads so it survives plugin updates and never bloats the plugin.

Source: framework/includes/option-types/icon/includes/svg-packs.php:49

fw_icon_svg_pack_markup

🔌 pluggable

fw_icon_svg_pack_markup( $id )

Resolve a 'pack/name' id (e.g. 'lucide/star', 'tabler/home') to full inline <svg> markup with currentColor. Returns '' for an unknown pack/name. The markup still passes through sc_icon_sanitize_svg() at render.

Source: framework/includes/option-types/icon/includes/svg-packs.php:146

fw_icon_svg_pack_registry

🔌 pluggable

fw_icon_svg_pack_registry()

id => { title, slug, svg_open }. Filterable so more packs can be added.

Source: framework/includes/option-types/icon/includes/svg-packs.php:22

🔌 pluggable

fw_icon_svg_pack_search( $pack, $query, $limit = 120 )

Names in a pack matching a query (name + keywords). Empty query → first slice.

ParameterTypeDescription
$packstring
$querystring
$limitintMax results (0 = no limit).

Source: framework/includes/option-types/icon/includes/svg-packs.php:184

fw_icon_svg_pack_search_data

🔌 pluggable

fw_icon_svg_pack_search_data( $pack )

Returns the cached search index data for an SVG icon pack, loaded from its bundled JSON file.

Source: framework/includes/option-types/icon/includes/svg-packs.php:101

fw_option_type_background_pro_force_admin_enqueue

🔌 pluggable

fw_option_type_background_pro_force_admin_enqueue()

Force-load the background-pro assets on post-edit screens.

background-pro ships its own stylesheet/script plus a stack of child controls (predefined-colors, color-picker, gradient-v2, upload, oembed, fw-multi-inline). When it's used in a shortcode (e.g. the Section's Background control), the page-builder modal loads options via an AJAX walk that does not reliably reach nested custom option types — so the control could render unstyled / inert. Enqueuing here on every post-edit screen (where the builder + shortcode modals live) guarantees the assets are present before any modal opens. enqueue_static dedupes by handle, so this is a safe no-op when something already loaded them.

Source: framework/includes/option-types/background-pro/class-fw-option-type-background-pro.php:714

fw_option_type_responsive_force_admin_enqueue

🔌 pluggable

fw_option_type_responsive_force_admin_enqueue()

Force-load the device-tabs + responsive assets on post-edit screens.

Same reasoning as the spacing type: generic shortcodes load their option HTML into the page-builder modal via AJAX, and the page-load enqueue walk that is supposed to cover them does not reliably reach a nested custom option type — so the device switcher could be unstyled/inert in those modals. Enqueuing on every post-edit screen guarantees the assets are present before any modal opens; wp_enqueue_* dedupes by handle, so this is a no-op when already loaded.

Source: framework/includes/option-types/responsive/class-fw-option-type-responsive.php:247

fw_option_type_spacing_force_admin_enqueue

🔌 pluggable

fw_option_type_spacing_force_admin_enqueue()

Force-load the spacing assets on post-edit screens.

Unlike base option types — whose styles live in the always-loaded option-types.css — the spacing control ships its OWN stylesheet/script (link toggle, device switcher, …). Generic shortcodes (text-block, button, …) load their option HTML into the page-builder modal via AJAX, and the page-load enqueue walk that is supposed to cover them does not reliably reach this nested custom option type — so its CSS/JS could be missing in those modals (symptom: both link-toggle icons showing, an unstyled grid). Enqueuing here on every post-edit screen (where the builder and shortcode modals live) guarantees the assets are on the page before any modal opens. The option type's own static_enqueued guard makes this a no-op when something already enqueued it.

Source: framework/includes/option-types/spacing/class-fw-option-type-spacing.php:472

unysonplus_all_icon_pack_ids

🔌 pluggable

unysonplus_all_icon_pack_ids()

Returns the ids of all available icon packs.

Source: framework/includes/option-types/icon/includes/pack-settings.php:74

unysonplus_any_font_pack_enabled

🔌 pluggable

unysonplus_any_font_pack_enabled()

True if at least one webfont pack is enabled (gates the Icon Fonts tab).

Source: framework/includes/option-types/icon/includes/pack-settings.php:121

unysonplus_enabled_icon_packs

🔌 pluggable

unysonplus_enabled_icon_packs()

Ids of the enabled packs. Defaults to ALL when the setting was never saved (existing sites are unchanged) and never returns empty (falls back to all), so a stray "uncheck everything" can't blank the picker entirely.

Iterates the CURRENT pack list, so a pack bundled AFTER the checklist was last saved (e.g. Tabler, added in a later release) is absent from the saved value and defaults ON — a new library is opt-out, not silently hidden. Only a pack explicitly present-and-false in the saved value is disabled.

Source: framework/includes/option-types/icon/includes/pack-settings.php:90

unysonplus_font_icon_pack_ids

🔌 pluggable

unysonplus_font_icon_pack_ids()

Ids of the webfont packs (Dashicons, Font Awesome, Entypo, …).

Source: framework/includes/option-types/icon/includes/pack-settings.php:20

unysonplus_icon_pack_choices

🔌 pluggable

unysonplus_icon_pack_choices()

Every selectable pack: id => label (font packs first, then SVG libraries).

Source: framework/includes/option-types/icon/includes/pack-settings.php:52

unysonplus_icon_pack_enabled

🔌 pluggable

unysonplus_icon_pack_enabled( $id )

Returns whether the given icon pack id is currently enabled.

Source: framework/includes/option-types/icon/includes/pack-settings.php:114

unysonplus_svg_icon_pack_ids

🔌 pluggable

unysonplus_svg_icon_pack_ids()

Ids of the bundled inline-SVG libraries that actually have data present. Derived from the multi-pack registry so a new pack (Tabler, …) appears everywhere just by dropping in its JSON + a registry entry.

Source: framework/includes/option-types/icon/includes/pack-settings.php:38

← Back to Functions overview