One very important aspect of a premium WordPress theme is the flexibility it offers to the users. That flexibility comes from the theme’s options panel. Some themes have ten options and some even have hundreds. But why doesn’t anyone allow the potential buyers to try the options out, make changes and see the full demonstration of a theme they are about to buy, not even WooThemes does that.

Why?

Well it’s quite simple, every time someone makes a change it will overwrite someone else’s changes and there is a big possibility that more people will be testing the options out at the same time and keep overwriting each other’s changes and wouldn’t be able to see how it works and behaves properly thus confusing everybody.

You probably have a blog, do you? Well imagine few more people making changes to it at the same time as you do, it’s like that. Stuff changes and you have no idea why, you didn’t change it.

So, How?

Well the idea is pretty simple, if you’re a theme/plugin developer you know that we have to add a prefix to our field names that go inside the database in order to avoid conflicts with other themes/plugins that could use the same names. For example, an option where the user inputs text he wants to be shown in the footer of a theme, we can call it “footer_text” but then it might conflict, so we add a prefix like “wpcp_”, “aviatic_” or anything else that we think should be unique or at least unlikely to be used by something else, so we get wpcp_footer_text.

Using that same method we can add the username of the user that makes changes as a suffix or prefix (doesn’t matter) so if a user with username “John” makes changes they will be saved and later retrieved as “wpcp_footer_text_John” and when a different user with username “Michael” makes changes it will be “wpcp_footer_text_Michael” so no conflicts will be made and no data will be overwritten.

Database Usage

For themes that have a big amount of options (like WooThemes or PliablePress) it will use a lot of data. For example 50 options changed by 100 users is 5000 rows in the database. But that’s not a big problem because WordPress can be set to delete the data after a certain time period.

Does It Really Work?

Well in theory it should work just fine, it’s pretty simple, i haven’t tested it yet but i started working on a little example and will update this post when it’s done. In the meantime if anybody is reading this let me know your thoughts.

Update: It Works

I just tested it and it works without a problem. I needed 2 minutes to alter a theme to support this, yes just 2 minutes, few lines of code. Check back later, i’ll throw in a demo so you can all test it out.

Our WordPress themes
We have a few WordPress themes that we would like you to take a look at if you want.
check out the portfolio