PHPackages                             nf/option - 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. nf/option

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nf/option
=========

Theme option

1.5.0(7y ago)07693MITPHP

Since Jan 1Pushed 7y ago1 watchersCompare

[ Source](https://github.com/nf-theme/options)[ Packagist](https://packagist.org/packages/nf/option)[ RSS](/packages/nf-option/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (13)Used By (3)

The option plugin
=================

[](#the-option-plugin)

> It's an extension for our theme

#### Installation

[](#installation)

##### Step 1: Install Through Composer

[](#step-1-install-through-composer)

```
composer require nf/option

```

##### Step 2: Add the Service Provider

[](#step-2-add-the-service-provider)

Open `config/app.php` and register the required service provider.

```
  'providers'  => [
        // .... Others providers
        \NightFury\Option\ThemeOptionServiceProvider::class,
    ],
```

##### Step 3: Register your option scheme

[](#step-3-register-your-option-scheme)

> {tip} You can add your option scheme to `functions.php`

> {tip} For each scheme you added it create new section in Theme Configuration page.

```
use NightFury\Option\Abstracts\Input;
use NightFury\Option\Facades\ThemeOptionManager;

ThemeOptionManager::add([
    'name'   => 'General',
    'fields' => [
        [
            'label'    => 'Text',
            'name'     => 'theme_option_text', // the key of option
            'type'     => Input::TEXT,
            'required' => true,
        ],
        [
            'label'    => 'Textarea',
            'name'     => 'theme_option_text',
            'type'     => Input::TEXTAREA,
            'required' => true,
        ],
        [
            'label'    => 'Email',
            'name'     => 'theme_option_email',
            'type'     => Input::EMAIL,
            'required' => true,
        ],
        [
            'label'       => 'Gallery',
            'name'        => 'theme_option_gallery',
            'type'        => Input::GALLERY,
            'description' => 'We can select multi file. Drag and Drop to re-order content'
        ],
        [
            'label'       => 'Gallery With Meta Field',
            'name'        => 'theme_option_gallery_with_meta',
            'type'        => Input::GALLERY,
            'description' => 'Gallery with meta field, for now we support text and textarea on meta field.',
            'meta'        => [
                [
                    'label' => 'Text',
                    'name'  => 'meta_text',
                    'type'  => Input::TEXT,
                ],
                [
                    'label' => 'Textarea',
                    'name'  => 'meta_textarea',
                    'type'  => Input::TEXTAREA,
                ],
            ],
        ], [
            'label'       => 'Image',
            'name'        => 'theme_option_image',
            'type'        => Input::IMAGE,
            'description' => 'Choose your image by clicking the button bellow',
        ],
        [
            'label'   => 'Select',
            'name'    => 'theme_option_select',
            'type'    => Input::SELECT,
            'options' => [
                [
                    'value'    => 'first',
                    'label'    => 'First Value',
                    'selected' => true,
                ],
                [
                    'value'    => 'second',
                    'label'    => 'Second Value',
                    'selected' => false,
                ],
            ],
        ],
    ],
]);
```

##### Step 4: Get your option value

[](#step-4-get-your-option-value)

we can get the value of option as usually via `get_option` function

> {tip} for gallery value is a decoded string

```
get_option('{option_name}');
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 90.3% 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 ~27 days

Recently: every ~0 days

Total

12

Last Release

2756d ago

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/3bbdd95f61a0f401f1df7329c631647011c2ff72a745afe50f70d0ca7ad871ed?d=identicon)[khiemchay](/maintainers/khiemchay)

---

Top Contributors

[![nightfury-est](https://avatars.githubusercontent.com/u/20170474?v=4)](https://github.com/nightfury-est "nightfury-est (28 commits)")[![namtiendang](https://avatars.githubusercontent.com/u/21366682?v=4)](https://github.com/namtiendang "namtiendang (2 commits)")[![hieu-pv](https://avatars.githubusercontent.com/u/7848185?v=4)](https://github.com/hieu-pv "hieu-pv (1 commits)")

### Embed Badge

![Health badge](/badges/nf-option/health.svg)

```
[![Health](https://phpackages.com/badges/nf-option/health.svg)](https://phpackages.com/packages/nf-option)
```

###  Alternatives

[dipeshsukhia/laravel-country-state-city-data

Country State City Data Provider

8230.8k](/packages/dipeshsukhia-laravel-country-state-city-data)[ezsystems/ezplatform-xmltext-fieldtype

XmlText field type implementation for eZ Platform

16230.6k3](/packages/ezsystems-ezplatform-xmltext-fieldtype)[codeaken/sshkey

Library for working with and generating SSH keys

1260.0k1](/packages/codeaken-sshkey)

PHPackages © 2026

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