evertiro / historical-redux2

A simple, easily extendable options framework for WordPress based on NHP Theme Options Framework.
http://reduxframework.com
Other
105 stars 43 forks source link

Weird export bug #74

Closed psaikali closed 11 years ago

psaikali commented 11 years ago

Hi there,

screen-2013-02-01-12 46 46 PM

If I modify some of my settings, then copy the settings in the Export > Copy, then import the copied text, that works great.

But if I paste the copied text in the "import" textarea, and modify some settings, the import doesn't work.

Did I miss something?

psaikali commented 11 years ago

Oh, forget it, I just understood the structure of the exported code... It looks like the length of the setting is stored, so if it doesn't match it's not applied. Sorry 'bout that.

psaikali commented 11 years ago

A curiosity question to devs reading this:

{s:3:"img";s:58:"/wp-content/themes/mozaika/img/presets/madeira/body_bg.jpg"; .....

Would it be safe to do something like that to offer settings presets, or I'd rather implement some placeholder like...

{s:3:"img";s:58:"%themedirectory%/img/presets/madeira/body_bg.jpg";

And then modify my code to replace %themedirectory% with get_template_directory_uri(). I'm using the "import/export" as a way to offer 3 presets for my theme, so I need to get body/footer background images from the /img/ folder in my theme.