Irrespective of whether the practice of embedding shortcode behavior in a theme is the “correct” thing to do or not, it the most practical approach when selling theme on a premium marketplace like TF. The original poster asked why do authors not account for the situation when a buyer wants to change their theme later on, while keeping their current layout which has been created using embeded shortcodes. The answer to this is because it to complicated and impractical.
Many of the complex themes here on TF use a range of different frameworks as a basis for developing a theme. All of these frameworks require layout elements to use specific markup and specific CSS . Because of this, it would be almost impossible to create a plugin which your buyer could use with your theme and then keep using with a totally different theme. At the very least, even if the framework was compatible, the whole CSS of most shortcodes would need to be changed to fit the style of the new theme. This is not something which TF buyers want to have to do after buying a premium theme, and as such is not a recipe for good sales.
Assume then that you want to be a very “correct” developer and you only make plugins for your own themes and dont care what happens when your buyer changes theme later on. Well then you are back at square one, only now you have to support your less experiences buyer while they struggle to install/ update your range of plugins. You also now have several different code bases, instead of one if the shortcodes were intrgeated into your framework. Furthermore, when your buyer does change theme and your plugins spits out the markup suitable for your theme, inside a 3rd party theme, then they will come looking for support and answers why this plugin is not working. This hence doesn’t achieve anything except giving yourself more work.
While it may be possible to produce a free plugin which would output the most generic markup and css which would have some chance at rendering in most themes, this would put a severe restriction on your shortcodes complexity as well as bring you a lot of support requests. This tradeoff is not worth it, neither for you nor for your buyer. Nothing is achieved except “correct” development, which actually doesn’t solve the original poster’s problems.
scenario: autor A releases theme + own coded plugins which break/no longer work with author B theme.
question: who’s going to support the buyer and why.
Shortcodes in themes sold here are tightly bound with the theme itself. Having them in a separate plugin to be used with another theme is never going work. Quick example: how a tab (or column) shortcode using twitter bootstrap is supposed to work in a theme not using it ?
And who’s going to handle support for such situations ? neither author of new theme or author of old one will be able to so the buyer will be left alone to solve the issue. When he realize he can not, who’s going to blame in comments/ratings ?
Go here for support on the “Mentor” theme: Pixelentity Support Forums. You will need your purchase code to register.
revaxarts saidNope, as far as i know, envato apis only handle theme updates for now.
Does it work with plugins too? How users provide purchasecode and API key?
Purchase code is not needed, only buyer username/api key. The class must be provided the values, how to get them from the end user is author business but one would tipically add a couple of extra fields in theme options page.
everybody likes videos more than words, so first things first, here’s what we’re talking about: http://youtu.be/3UNA5AHEFF0
A while ago, envato released its wordpress toolkit which is great and we used it to include the automatic updates feature in our themes.
However, using a custom Theme_Upgrader turned out to be not such an easy task and we ended up adding quite some glue code. So, inspired by a recent thread here in the forums, we did a small research and found thishttps://github.com/jeremyclark13/automatic-theme-plugin-update
In short, the author uses the “pre_set_site_transient_update_themes” to inject custom updates in the native WordPress update system, which is so great because all you need to do now is using the Envato API to
- check if your theme has an update
- get the download link
- inject the above in the WordPress update system
So we created a small class using only class-envato-protected-api.php from the Envato toolkit and made available for all authors to download and use in their own theme: download link