WP Global Options
Implements a global option storage in WordPress.
by Felix Arntz · github.com/felixarntz/wp-global-options · website
★ 8stars
51composer installs
1forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/felixarntz/wp-global-options/archive/refs/heads/master.zipAlso on Packagist as felixarntz/wp-global-options:
composer require felixarntz/wp-global-optionsFrom the readme
WP Global Options
Implements a global option storage in WordPress.
What it does
introduces a database table globaloptions
introduces a CRUD API for global options, including sanitization and validation
introduces a CRUD API for global transients
introduces an API for registering/unregistering global settings
includes a wp global-options command for WP-CLI
How to install
The plugin can either be installed as a network-wide regular plugin or alternatively as a must-use plugin.
Recommendations
While it is a best practice to prefix plugin functions and classes, this plugin is a proof-of-concept for WordPress core, and several functions may end up there eventually. This plugin only prefixes functions and classes that are specific to the plugin, internal helper functions for itself or hooks. Non-prefixed functions and classes are wrapped in a conditional so that, if WordPress core adapts them, their core variant will be loaded instead. Therefore, do not define any of the following functions or classes:
sanitizeglobaloption()
getglobaloption()
updateglobaloption()
addglobaloption()
deleteglobaloption()
wploadglobalalloptions()
getglobaltransient()
setg
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| 1.0.0-beta.1 | Feb 21, 2018 | — | — |