PHPackages                             wp-launchpad/options - 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. wp-launchpad/options

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

wp-launchpad/options
====================

Options library for Launchpad

v3.1.0(1y ago)0347↓100%1PHPPHP &gt;=7.0

Since Apr 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/wp-launchpad/options)[ Packagist](https://packagist.org/packages/wp-launchpad/options)[ RSS](/packages/wp-launchpad-options/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (3)Versions (16)Used By (1)

Options
-------

[](#options)

This library offers OOP facades to work with options and transients in WordPress.

### Install

[](#install)

Just run the command `composer require wp-launchpad/options`

Note: It is easier to work with that library using the [Launchpad framework](https://github.com/wp-launchpad/launchpad).

### Options

[](#options-1)

Options are a way to save a simple and light value in WordPress.

To use options with that library you need first to instantiate the class and provide it a prefix:

```
$options = new \LaunchpadOptions\Options('my_prefix');
```

Note: By convention your prefix should be your plugin or theme name.

Once this is done then you can directly access, update or delete options using the following API:

MethodDescriptionExample`get`Fetch the option value`$options->get('my_option', false )``set`Update the option value`$options->set('my_option', true )``delete`Delete the option value`$options->delete('my_option' )`### Site options

[](#site-options)

Site options are a way to save a simple and light value in WordPress just as regular options. However, the main difference resides in the fact in case of a multisite it will be present at the level of the website and not at the level from the network.

To use options with that library you need first to instantiate the class and provide it a prefix:

```
$options = new \LaunchpadOptions\SiteOptions('my_prefix');
```

Note: By convention your prefix should be your plugin or theme name.

Once this is done then you can directly access, update or delete options using the following API:

MethodDescriptionExample`get`Fetch the option value`$options->get('my_option', false )``set`Update the option value`$options->set('my_option', true )``delete`Delete the option value`$options->delete('my_option' )`### Transients

[](#transients)

Transients are a way to save simple and light value but at the difference of options they expire after a certain time.

To use transients with that library you need first to instantiate the class and provide it a prefix:

```
$transients = new \LaunchpadOptions\Transients('my_prefix');
```

Note: By convention your prefix should be your plugin or theme name.

Once this is done then you can directly access, update or delete transients using the following API:

MethodDescriptionExample`get`Fetch the transient value`$transients->get('my_transient', false, HOUR )``set`Update the transient value`$transients->set('my_transient', true )``delete`Delete the transient value`$transients->delete('my_transient' )`### Settings

[](#settings)

Settings are a way to easily save configurations for a plugin or a theme.

The advantage compared to options is that it is possible to mass update them or export them in one time.

To use settings with that library you need first to instantiate the class and provide it a prefix:

```
$settings = new \LaunchpadOptions\Settings(new \LaunchpadOptions\Options('my_prefix'), 'my_settings_prefix');
```

Note: By convention your prefix should be your plugin or theme name.

Once this is done then you can directly access, update or delete settings using the following API:

MethodDescriptionExample`get`Fetch the setting value`$settings->get('my_setting', false )``set`Update the setting value`$settings->set('my_setting', true )``delete`Delete the setting value`$settings->delete('my_setting' )``dumps`Dumps all settings values`$settings->dumps()``import`Import multiple settings values`$settings->imports(['my_setting' => false])`### Set

[](#set)

Sets are a way to easily interact with array data coming from an option.

To use set with that library you need first to instantiate the class and provide it a prefix:

```
$set = new \LaunchpadOptions\Set([
    'key' => 'value'
], 'my_prefix');
```

Note: The prefix is actually important for filters within the class.

Once this is done then you can directly access, update or delete values within the set using the following API:

MethodDescriptionExample`get`Fetch the set value`$set->get('my_setting', false )``set`Update the set value`$set->set('my_setting', true )``delete`Delete the set value`$set->delete('my_setting' )``get_values`Dumps all set values`$set->get_values()``set_values`Import multiple set values`$set->set_values(['my_setting' => false])`Note: The key difference between settings and sets is that Settings handle the saving in the database themselves when Set won't.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance40

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

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

Recently: every ~52 days

Total

9

Last Release

510d ago

Major Versions

v0.1.5 → v3.1.02024-12-15

### Community

Maintainers

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

---

Top Contributors

[![CrochetFeve0251](https://avatars.githubusercontent.com/u/18537428?v=4)](https://github.com/CrochetFeve0251 "CrochetFeve0251 (24 commits)")

---

Tags

launchpadoptionstransientswordpresswordpress-plugin

### Embed Badge

![Health badge](/badges/wp-launchpad-options/health.svg)

```
[![Health](https://phpackages.com/badges/wp-launchpad-options/health.svg)](https://phpackages.com/packages/wp-launchpad-options)
```

PHPackages © 2026

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