Sooner or later, every plugin developers will likely want to store user data. Since Typesetter doesn't use a database, saving and retrieving data is easily accomplished with two functions.

global $addonPathData;
$file = $addonPathData.'/data.php';

//saving data
$data = array('your'=>'array','of'=>'data'); 
if( !gpFiles::SaveData($file, 'data', $data) ){
	//... warn user data didn't save
}


//retrieve stored data
$data = gpFiles::Get($file,'data');

SaveData() and Get() are both available as of Typesetter 4.4

News

Typesetter 5.1
8/12/2017

Typesetter 5.0.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

Over 8 Times Faster Than Wordpress
5/3/2016

We've known for a long time that Typesetter is fast. It's something we take pride ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register