Skip to content

rockschtar/wordpress-object-storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rockschtar/wordpress-object-storage

Description

WordPress Must Use Plugin that provides functions simliar to transients but without the general behavior of transients in WordPress. Stored data persist forever or until expiration time. You do not need to serialize values. If the value needs to be serialized, then it will be serialized before it is set. Developed for usage with composer based WordPress projects (roots/bedrock orjohnpbloch/wordpress).

Requirements

Install

composer require rockschtar/wordpress-object-storage

Usage

Set Object

//without expiration time
rsos_set_object('my-key', 'my-value');

//with expiration time
rsos_set_object('my-key', 'my-value', 60 * 60 * 24);

Get Object

$myKey = rsos_get_object('my-key');

Delete Object

$myKey = rsos_delete_object('my-key');

License

rockschtar/wordpress-object-storage is open source and released under MIT license. See LICENSE.md file for more info.

About

Library for storing serialized data in WordPress options table.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages