PHPackages                             agence-adeliom/acf-icon-field - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. agence-adeliom/acf-icon-field

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

agence-adeliom/acf-icon-field
=============================

An advanced icon field for ACF

1.0.1(2y ago)113[3 PRs](https://github.com/agence-adeliom/acf-icon-field/pulls)MITPHPPHP &gt;=8.0

Since Jan 4Pushed 2y agoCompare

[ Source](https://github.com/agence-adeliom/acf-icon-field)[ Packagist](https://packagist.org/packages/agence-adeliom/acf-icon-field)[ Docs](https://github.com/agence-adeliom/acf-icon-field)[ GitHub Sponsors](https://github.com/agence-adeliom)[ RSS](/packages/agence-adeliom-acf-icon-field/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (6)Used By (0)

ACF Icon Field
==============

[](#acf-icon-field)

Provide an advanced SVG Icon field for ACF

Installation
------------

[](#installation)

Install with composer

```
composer require agence-adeliom/acf-icon-field
```

Usage/Examples
--------------

[](#usageexamples)

#### Use Font Awesome Pro instead of Free

[](#use-font-awesome-pro-instead-of-free)

1. Change Font Awesome registration

```
add_filter( 'acf/icon_field/register_font-awesome', function() {
    return "pro";
});
```

2. Copy Font Awesome SVG Sprites following the [documentation](https://fontawesome.com/docs/web/add-icons/svg-sprites) into your theme folder `resources/icons/fa/`

```
├── resources
│   ├── icons
│   │   ├── fa
│   │   │   ├── brands.svg
│   │   │   ├── duotone.svg
│   │   │   ├── light.svg
│   │   │   ├── regular.svg
│   │   │   ├── sharp-light.svg
│   │   │   ├── sharp-regular.svg
│   │   │   ├── sharp-solid.svg
│   │   │   ├── sharp-thin.svg
│   │   │   ├── solid.svg
│   │   │   ├── thin.svg

```

Custom library
--------------

[](#custom-library)

```
$library = new \ACF_icon_library("", "");

$library->setResolver(string $url); // URL to resolve your icon
// Placeholders :
//
// {{assetPath}} - Path to your theme root
// {{library}} - Library name
// {{subset}} - Subset key
// {{name}} - Icon name

$library->setSpritesheet(bool $support); // (default) false, Enable support for SVG Sprites

$library->addSubset(string $id, string $name = '', string $prefix = ''); // Append a subset with prefix to your library

$library->addIcon(string $id, string $name = '', ?string $subset = null, string $prefix = ''); // Append an icon to your library
```

### Example

[](#example)

Add Heroicons library

```
$library = new \ACF_icon_library("Heroicons", "heroicons");
$library->setResolver("https://cdn.jsdelivr.net/npm/heroicons@2.0.18/24/{{subset}}/{{name}}.svg");

// Add subsets
$library->addSubset("solid", "Solid");
$library->addSubset("outline", "Outline", "o");

// Add Solid Icons
$library->addIcon('chat-bubble-left', "Chat bubble on left", "solid");
$library->addIcon('cloud', "Cloud", "solid");
$library->addIcon('cog', "Cog", "solid");
$library->addIcon('document-text', "Text document", "solid");
$library->addIcon('gift', "Gift", "solid");
$library->addIcon('speaker-wave', "Speaker wave", "solid");

// Add Outline Icons
$library->addIcon('chat-bubble-left', "Chat bubble on left", "outline", "o");
$library->addIcon('cloud', "Cloud", "outline", "o");
$library->addIcon('cog', "Cog", "outline", "o");
$library->addIcon('document-text', "Text document", "outline", "o");
$library->addIcon('gift', "Gift", "outline", "o");
$library->addIcon('speaker-wave', "Speaker wave", "outline", "o");
```

Append Heroicons library to registry

```
add_filter( 'acf/icon_field/registry', function( \ACF_icon_registry $registry ) use ($library) {
    $registry->addLibrary($library); // To add a new library
    return $registry;
}, 10, 1 );
```

Hooks
-----

[](#hooks)

#### Disable default icons set

[](#disable-default-icons-set)

```
add_filter( 'acf/icon_field/register_default', function( bool $register ) {
    $register = false;
    return $register;
}, 10, 1 );
```

#### Change/Disable Font Awesome icons set

[](#changedisable-font-awesome-icons-set)

```
add_filter( 'acf/icon_field/register_font-awesome', function( $register ) {
    $register = "free"; // (default) To enable Font Awesome Free
    $register = "pro"; // To enable Font Awesome Pro via an SVG Sprite sheet
    $register = false; // To disable Font Awesome

    return $register;
}, 10, 1 );
```

#### Customize Icon Library registry

[](#customize-icon-library-registry)

```
add_filter( 'acf/icon_field/registry', function( \ACF_icon_registry $registry ) {

    $library = new \ACF_icon_library("Lorem", "lo");
    ...

    $registry->addLibrary($library); // To add a new library
    $registry->removeLibrary('fa'); // To remove a library
    $registry->getLibraries(); // Get all libraries
    $registry->getLibrary(); // Get one library

    return $registry;
}, 10, 1 );
```

#### Disable cache optimisation

[](#disable-cache-optimisation)

```
add_filter( 'acf/icon_field/use_cache', '__return_false');
```

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

Authors
-------

[](#authors)

- [@arnaud-ritti](https://github.com/arnaud-ritti)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

859d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6471ac11bb69c46070e9140c9272639d3fe4b569c68ef8cde7cf60b0aa4ce9e6?d=identicon)[arnaud-ritti](/maintainers/arnaud-ritti)

![](https://www.gravatar.com/avatar/f84eb060084594eb8f047a7244c2bf238f7e677850a26457610402bc30030afe?d=identicon)[adeliom](/maintainers/adeliom)

![](https://www.gravatar.com/avatar/1e0ac18b893f6bcde8968f02339a8c582c1e3e36e031eaf7eb7503d7d0d4c526?d=identicon)[jeromeengeln](/maintainers/jeromeengeln)

---

Top Contributors

[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![arnaud-ritti](https://avatars.githubusercontent.com/u/77437157?v=4)](https://github.com/arnaud-ritti "arnaud-ritti (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

acficonwordpress-pluginwordpressacf

### Embed Badge

![Health badge](/badges/agence-adeliom-acf-icon-field/health.svg)

```
[![Health](https://phpackages.com/badges/agence-adeliom-acf-icon-field/health.svg)](https://phpackages.com/packages/agence-adeliom-acf-icon-field)
```

###  Alternatives

[samrap/acf-fluent

A fluent interface for the Advanced Custom Fields WordPress plugin

28656.0k4](/packages/samrap-acf-fluent)[mcguffin/acf-customizer

Use ACF Fields in customizer.

7611.3k](/packages/mcguffin-acf-customizer)[iceicetimmy/acf-post-type-selector

Post type selector for Advanced Custom Fields.

559.0k](/packages/iceicetimmy-acf-post-type-selector)[mmirus/acf-flexible-content-title

Display the content of a field in the title bar of your Advanced Custom Fields flexible content sections.

362.8k](/packages/mmirus-acf-flexible-content-title)[smithfield-studio/acf-svg-icon-picker

Add ACF field for selecting SVG icons.

3710.8k](/packages/smithfield-studio-acf-svg-icon-picker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
