PHPackages                             foadyousefi/seven-fields - 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. foadyousefi/seven-fields

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

foadyousefi/seven-fields
========================

WordPress developer-friendly option pages with custom fields.

1.1.0(5y ago)158GPL-2.0PHPPHP &gt;=5.3

Since Oct 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/foadyousefi/seven-fields)[ Packagist](https://packagist.org/packages/foadyousefi/seven-fields)[ Docs](https://hackabit.io/)[ RSS](/packages/foadyousefi-seven-fields/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (3)Used By (0)

Seven-Fields
============

[](#seven-fields)

### About

[](#about)

For one of my projects that needs some settings, I searched to find a library who does this for me. I found Carbon Fields, its nice and relativaly easy to use and most important, could be installed via composer.

But it has its limitations. Non of the fields types had description (at least when I used it). Also the function for retriving options valie from database, is loading after **init** action, but what if I need to access data before init? Well, I need to write my function. And also field types was a bit limited.

So decided to write my own and after finishing, thought why not to open source it so other can benifit.

### Supported Fields

[](#supported-fields)

- Checkbox
- Header
- Raw html
- Multiselect
- Select
- Textfield
- Password
- Textarea

More fields will be added later, but til them, don't hesitate to ask for features and more fields by opening new issue.

### How to use?

[](#how-to-use)

1- In your plugin or theme directory, run `composer require foadyousefi/seven-fields`

2- In your functions.php or your plugin write:

```
use SevenFields\Fields\Fields;
use SevenFields\Container\Container;

add_action( 'admin_menu', 'setting_pages_init' );
function setting_pages_init() {
    Container::make( 'Menu title', 'menu-slug' )
    ->add_fields( 'add_fields_to_the_page' );
}

function add_fields_to_the_page() {
    Fields::add('header', null, 'This is header' );
    Fields::add('text', 'example_text_field', 'This is text field', 'And this is description' );
    Fields::add('password', 'example_password_field', 'This is password field', 'And this is description' );
    Fields::add( 'checkbox', 'example_checkbox', 'Checkbox label', 'And description' );
    Fields::add( 'textarea', 'example_text_area', 'Textarea example',  'And description. New line in description with bold text.' );

  }

```

### How to read options?

[](#how-to-read-options)

To read options from database, you can somply use wordpress [`get_option()`](https://developer.wordpress.org/reference/functions/get_option/) function by passing the optoin name and optional default value. like so:

```
get_option( 'example_text_field', 'lorem ipsum' )

```

I will try to update README and describe all possible options.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~944 days

Total

2

Last Release

1884d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19663888?v=4)[Foad Yousefi](/maintainers/foadyousefi)[@foadyousefi](https://github.com/foadyousefi)

---

Top Contributors

[![foadyousefi](https://avatars.githubusercontent.com/u/19663888?v=4)](https://github.com/foadyousefi "foadyousefi (21 commits)")

### Embed Badge

![Health badge](/badges/foadyousefi-seven-fields/health.svg)

```
[![Health](https://phpackages.com/badges/foadyousefi-seven-fields/health.svg)](https://phpackages.com/packages/foadyousefi-seven-fields)
```

###  Alternatives

[agencetwogether/hookshelper

Simple plugin to toggle display hooks available in current page.

2714.0k](/packages/agencetwogether-hookshelper)[nguyendachuy/laravel-menu

Laravel Menu Builder | Drag &amp; Drop | Bootstrap | Laravel 7 | Laravel 8 | Laravel 9 | Laravel 10 | Laravel 11 | Laravel 12

162.2k](/packages/nguyendachuy-laravel-menu)

PHPackages © 2026

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