iranimij/wp-options-manager
最新稳定版本:1.0.6
Composer 安装命令:
composer require iranimij/wp-options-manager
包简介
You can easily manage your plugin's options by this library
README 文档
README
With this library, you can easily manage your plugin's options, in the best and most efficient way.
How to install the library
The recommended way to install this library in your project is by loading it through Composer:
composer require iranimij/wp-options-manager
How to use this library
// Updating an option wp_options_manager()->update( 'test-option-key', 'test-option-value' )->save(); // Updating two options in a row wp_options_manager()->update( 'test-option-key', 'test-option-value' )->update( 'test-option-key2', 'test-option-value2' )->save(); // Updating multiple keys in just one array wp_options_manager()->update( [ 'first-key' => 'first-value', 'second-key' => 'second-value', 'third-key' => 'third-value', ] )->save(); // Getting an option => Output = 'test-option-value wp_options_manager()->select( 'test-option-key' ); // Deleting an option wp_options_manager()->delete( 'test-option-key' );
Where can we find the data in the database
All data are saved in one key in options table in the database. the key name is totally equal to the slug of your plugin. the name will be chosen automatically.
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-12-07