PHPackages                             webkinder/wordpress-options-page-api - 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. webkinder/wordpress-options-page-api

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

webkinder/wordpress-options-page-api
====================================

WordPress settings api abstraction class

2.2.2(3mo ago)3966↑172.7%GPL-2.0-or-laterPHPPHP &gt;=7.0.0CI failing

Since Mar 14Pushed 3mo agoCompare

[ Source](https://github.com/webkinder/wordpress-options-page-api)[ Packagist](https://packagist.org/packages/webkinder/wordpress-options-page-api)[ Docs](https://github.com/webkinder/wordpress-options-page-api)[ RSS](/packages/webkinder-wordpress-options-page-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (12)Used By (0)

What is this?
-------------

[](#what-is-this)

It's a PHP class wrapper for handling WordPress [Settings API](http://codex.wordpress.org/Settings_API). This is an easily accessible OOP API for developers to use in their own plugins.

Package Installation (via Composer)
-----------------------------------

[](#package-installation-via-composer)

To install this package, edit your `composer.json` file:

```
{
    "require": {
        "webkinder/wordpress-options-page-api": "2.2.2"
    }
}
```

Now run:

`$ composer install`

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

[](#usage-example)

### Registering options

[](#registering-options)

```
use WebKinder\SettingsAPI;

(new SettingsAPI(['network_settings' => false]))
	->set_sections(
		[
			[
				'id' => 'custom_options',
				'title' => __('Custom Options'),
			],
		]
	)
	->set_fields([
		'custom_options' => [
			[
				'name' => 'information_text',
				'label' => __('Information Text'),
				'type' => 'textarea',
			],
			[
				'name' => 'radio_option',
				'label' => __('Radio Option'),
				'type' => 'radio',
				'options' => [
					'top' => __('Top'),
					'bottom' => __('Bottom'),
					'bottom-right' => __('Bottom Right'),
				],
			],
			[
				'name' => 'checkbox_option',
				'label' => __('Checkbox Option'),
				'type' => 'checkbox',
				'desc' => __('aktivieren'),
			],
			[
				'name' => 'multicheck_option',
				'label' => __('Multicheck Options'),
				'type' => 'multicheck',
				'options' => [
					'top' => __('Top'),
					'bottom' => __('Bottom'),
					'bottom-right' => __('Bottom Right'),
				],
			],
		],
	])
	->register_page('Options page', 'Options page', 'manage_options', 'custom-options-page')
	->admin_init()
;
```

### Retrieving saved options

[](#retrieving-saved-options)

```
/**
 * Get the value of a settings field
 *
 * @param string $option settings field name
 * @param string $section the section name this field belongs to
 * @param string $default default text if it's not found
 *
 * @return mixed
 */
function prefix_get_option( $option, $section, $default = '' ) {

    $options = get_option( $section );

    if ( isset( $options[$option] ) ) {
        return $options[$option];
    }

    return $default;
}
```

What this plugin for?
---------------------

[](#what-this-plugin-for)

This is an API for the WordPress Settings API

Acknowledgments
---------------

[](#acknowledgments)

This is an extended version of [tareq1988](https://github.com/tareq1988/wordpress-settings-api-class) with more features and opinionated changes and additions.

Changelog:

---

```
2.2.2 (28 January, 2026)
------------------------
- Hotfix: Improve backwards compatibility

2.2.1 (28 January, 2026)
------------------------
- Fix multilang pages field type

2.2.0 (20 March, 2025)
------------------------
- Add option "multiple" to select fields

2.1.1 (19 March, 2024)
------------------------
- Update docs
- More dynamic handling

2.1.0 (19 March, 2024)
------------------------
- Add support for network options

2.0.2 (24 April, 2023)
------------------------
- Better check for multilang

2.0.1 (29 March, 2023)
------------------------
- Fix hidden translation fields that were required and could be empty

2.0.0 (28 March, 2023)
------------------------
- Add proper versioning
- Add conditional support for hiding and disabling fields
- Add option for required fields
- Add multilang support (WPML only)

1.0.0 (14 March, 2019)
------------------------
- First version published

```

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance79

Regular maintenance activity

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~251 days

Recently: every ~170 days

Total

11

Last Release

111d ago

Major Versions

1.0.1 → 2.0.02023-03-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/597462d46107dd3eedd2b10f3add8a737c67c8148836713dd97585128d19d477?d=identicon)[webkinder](/maintainers/webkinder)

---

Top Contributors

[![svenvonarx](https://avatars.githubusercontent.com/u/5146747?v=4)](https://github.com/svenvonarx "svenvonarx (10 commits)")[![ivowk](https://avatars.githubusercontent.com/u/171673195?v=4)](https://github.com/ivowk "ivowk (2 commits)")[![raphaelportmann](https://avatars.githubusercontent.com/u/25031352?v=4)](https://github.com/raphaelportmann "raphaelportmann (2 commits)")[![pascalknecht](https://avatars.githubusercontent.com/u/8436238?v=4)](https://github.com/pascalknecht "pascalknecht (1 commits)")

---

Tags

wordpresswpsettings-api

### Embed Badge

![Health badge](/badges/webkinder-wordpress-options-page-api/health.svg)

```
[![Health](https://phpackages.com/badges/webkinder-wordpress-options-page-api/health.svg)](https://phpackages.com/packages/webkinder-wordpress-options-page-api)
```

###  Alternatives

[tareq1988/wordpress-settings-api-class

WordPress settings API Abstraction Class

46611.1k3](/packages/tareq1988-wordpress-settings-api-class)[justcoded/wordpress-theme-boilerplate

WordPress theme boilerplate with better code structure and OOP support.

563.9k1](/packages/justcoded-wordpress-theme-boilerplate)[balbuf/composer-wp

Manage WordPress core, plugins, and themes with composer.

173.6k](/packages/balbuf-composer-wp)[typisttech/wp-admin-notices

A simplified OOP implementation of the WordPress admin notices

141.2k](/packages/typisttech-wp-admin-notices)

PHPackages © 2026

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