_preset_db_name = 'APL_preset_db-' . $db_name; $this->option_load_db(); //If data doesn't exist in options, then make one if (empty($this->_preset_db) && empty($this->_delete)) { $this->set_to_defaults(); $this->options_save_db(); //$this->option_load_db(); } } /** * Name: APL Load Preset Option Database * Desc: * @param none * * @since 0.1.0 * * 1) */ function option_load_db() { //$this->_option_db_name = 'APL_option_db_'.$db_name; $DBOptions = get_option($this->_preset_db_name); $this->_preset_db = $DBOptions->_preset_db; $this->_delete = $DBOptions->_delete; } /** * Name: APL Save Preset Option Database * Desc: * @param none * * @since 0.1.0 * * 1) */ function options_save_db() { update_option($this->_preset_db_name, $this); } // function options_save_db($newOptions) // { // // //$this->_option_db_name = 'APL_option_db_'.$db_name; // //$this->update_options_db(); // if (isset($newOptions)) // { // $this->_preset_db = $newOptions->_preset_db; // update_option($newOptions->_preset_db_name, $newOptions); // } // // } /** * Name: APL Remove Preset Option Database * Desc: * @param none * * @since 0.1.0 * * 1) */ function options_remove_db() { delete_option($this->_preset_db_name); } /** * Name: APL Set Presets to Default * Desc: * @param none * return none * * @since 0.1.0 * * 1) */ function set_to_defaults() { $this->_preset_db_name = 'APL_preset_db-default'; $this->_preset_db = new stdClass(); //$this->_preset_db = array(); $this->_delete = true; $tmpPreset = (string) '{"pageContentDivided_5":{ "_before":"

", "_content":"[post_title]<\/a> by [post_author] - [post_date][post_content]", "_after":"<\/p>", "_catsSelected":"", "_tagsSelected":"", "_catsInclude":"false", "_tagsInclude":"false", "_catsRequired":"false", "_tagsRequired":"false", "_listOrder":"DESC", "_listOrderBy":"post_date", "_listAmount":"5", "_postType":"post", "_postParent":"None", "_postExcludeCurrent":"true" }, "postExcerptDivided_5":{ "_before":"

", "_content":"[post_title]<\/a> by [post_author] - [post_date][post_excerpt]", "_after":"<\/p>", "_catsSelected":"", "_tagsSelected":"", "_catsInclude":"false", "_tagsInclude":"false", "_catsRequired":"false", "_tagsRequired":"false", "_listOrder":"DESC", "_listOrderBy":"post_date", "_listAmount":"5", "_postType":"post", "_postParent":"None", "_postExcludeCurrent":"true" }, "simpleAttachmentList_10":{ "_before":"