PHPackages                             ardent.intent/wp-settings-adapter - 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. ardent.intent/wp-settings-adapter

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

ardent.intent/wp-settings-adapter
=================================

An abstraction layer to ease the use of the Wordpress settings API.

0.3.1(3y ago)06GPL-2.0-or-laterPHPPHP &gt;=7.4

Since Oct 4Pushed 3y ago1 watchersCompare

[ Source](https://github.com/TJSeabury/wp-settings-adapter)[ Packagist](https://packagist.org/packages/ardent.intent/wp-settings-adapter)[ RSS](/packages/ardentintent-wp-settings-adapter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (5)Versions (6)Used By (0)

WP Settings Adapter
===================

[](#wp-settings-adapter)

The Adapter is a declarative facade for the Wordpress Settings API. It is designed to handle the complexities behind the scenes and get out of your way so you can focus on what's really important.

Disregard the tangled, putrid spaghetti and optionalize your theme or plugin with ease!

Usage Example
-------------

[](#usage-example)

```
use \ArdentIntent\WpSettingsAdapter\Adapter;

global $pluginOptions;
($pluginOptions = Adapter::createPage(
  'Theme Options',
  'Not spaghetti.',
  'manage_options',
  'adapter-test',
  'general',
  'dashicons-flag',
  2
))->withSections([

  ($general = $pluginOptions->createSection('general'))->withSettings([

    $general->createSetting(
      'test-1',
      'An example text setting description.'
    )->ofType()->text(),

    $general->createSetting('test-2')->ofType()->color(),

    $general->createSetting('test-5')->ofType()->text(),

  ]),

  ($special = $pluginOptions->createSection('special'))->withSettings([

    $special->createSetting(
      'test-6',
      'A short description of this setting.'
    )->ofType()->text(),

    $special->createSetting(
      'test-3',
      'An example select setting.'
    )->ofType()->select()->withValues([
      'apple' => 'Apple',
      'pear' => 'Pear',
      'pineapple' => 'Pineapple'
    ]),

    $special->createSetting('test-4')->ofType()->toggle(),

  ])

])->withSubPages([

  ($subPageOne = $pluginOptions->createSubPage(
    'Subpage One',
    'An example sub-page.',
    'manage_options',
    'adapter-test-sub-one',
    'general',
    1
  ))->withSections([

    ($general = $subPageOne->createSection('general'))->withSettings([

      $general->createSetting('general-1')->ofType()->toggle(),

      $general->createSetting('general-2')->ofType()->select()->withValues([
        'go',
        'touch',
        'grass'
      ])

    ]),

    ($social = $subPageOne->createSection('social'))->withSettings([

      $general->createSetting('social-1', 'Social link 1.')->ofType()->text(),

      $general->createSetting('social-2', 'Social link 2.')->ofType()->text(),

      $general->createSetting('social-3')->ofType()->select()->withValues([
        'on' => 'On',
        'off' => 'Off'
      ])

    ])

  ]),

  ($subPageTwo = $pluginOptions->createSubPage(
    'Subpage Two',
    'An example sub-page.',
    'manage_options',
    'adapter-test-sub-two',
    'general',
    2
  ))->withSections([

    ($whatever = $subPageTwo->createSection('whatever'))->withSettings([

      $whatever->createSetting('what', 'Life is suffering.')->ofType()->toggle(),

      $whatever->createSetting('ever', 'No one understands me.')->ofType()->toggle()

    ])

  ])

])->register();
```

Development Mode
----------------

[](#development-mode)

You may enable development mode by invoking the following method. `Adapter::enableDevMode();`

Enabling dev mode will result in the options being rendered with paste-able snippets that get the value of their respective option.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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 ~0 days

Total

5

Last Release

1311d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ff53396bf8cb73a30add4f2d541feea754dca30c7055c00355f5cd7968dcaaa2?d=identicon)[ardent.intent](/maintainers/ardent.intent)

---

Top Contributors

[![TJSeabury](https://avatars.githubusercontent.com/u/7571273?v=4)](https://github.com/TJSeabury "TJSeabury (60 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ardentintent-wp-settings-adapter/health.svg)

```
[![Health](https://phpackages.com/badges/ardentintent-wp-settings-adapter/health.svg)](https://phpackages.com/packages/ardentintent-wp-settings-adapter)
```

###  Alternatives

[symfony/polyfill-php72

Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions

4.8k674.7M31](/packages/symfony-polyfill-php72)[symfony/polyfill-intl-icu

Symfony polyfill for intl's ICU-related data and classes

2.6k251.4M96](/packages/symfony-polyfill-intl-icu)[nette/php-generator

🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.5 features.

2.2k64.2M574](/packages/nette-php-generator)[consolidation/site-process

A thin wrapper around the Symfony Process Component that allows applications to use the Site Alias library to specify the target for a remote call.

5345.3M8](/packages/consolidation-site-process)[sycho/flarum-profile-cover

Adds the ability to add a cover image to a profile.

1836.6k](/packages/sycho-flarum-profile-cover)

PHPackages © 2026

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