You escape the data based on where you use it.
If you use it in attributes, you would ofc use esc_attr() on it etc.
Just play it smart and you will be ok, the goal is not to “ESCAPE EVERYTHING!!!” but to minimize the possibility of failures due to wrong usage of your products.And believe me, buyers will find a way to use your product wrong
I understand where to use functions like esc_html(), esc_attr() and so on, in right places. But I’m still confused about my main question, which is whether or not to escape the data from theme options. Also you said that ‘the goal is not to “ESCAPE EVERYTHING”’. Are you saying that should not escape theme options data? would that be an over kill of some kind?
In the Theme submission requirements, it is mentioned that we are supposed to `escape any questionable content for output’. Does this include the theme options data? which comes from the admin himself.
I think it is safe to assume that the data is safe, also I’ve never seen a theme that escapes theme options data, even one I bought most recently, but I still want to know what you think about it.
Old thread, but here is what I think, increment-ing a value wouldn’t work as some of you suggested, as this value is not getting stored anywhere, right? So I think it is better to use some kind of Unix timestamp technique, like appending the shortcodes name with the timestamp value, like so:
$id = ‘tab’ . time();
And then ull have a unique id. And I believe there is no maximum limit on id or class names, so this should be fine. However, if you are adding more than 1 shortcode of the same type and at the same time, then you might need to increment the $id or change it some how so it is not the same for each shortcode you add.
This is what I’ve come up with, I’m also not sure how it is done by other developers
Im pretty sure it is – but it’s a good idea/practice to include them as plugins anyhow.
But what about the styling that would go with the plugin, that you have to include with the theme? I mean if I would be asking users to install the plugin through TGM and through Wordpress Repo, what should I do about the styling of the items? Create a plugin for that too, or it’s ok if I include it with my theme files?
I’m using Portfolio Post Type plugin to create the functionality of Portfolio Post Type in my theme, and I’m including this plugin through TGM from the Wordpress repository. Now this plugin only takes care of creating custom post type (Portfolio), and I do the styling of the Portfolio items in my theme.
Now I’ve been under the impression that it was a requirement of Themeforest to have things like Custom Post Type in a separate plugin. I can’t remember where I read that, but I can’t find this anywhere now, not even in the Wordpress Theme Requirement section. I’m very confused about this and would really appreciate if someone can clarify if we are required to have plugins embedded in our theme, if not, then what about the plugins that rely on some configuration, are we supposed to make separate plugins for that?
Please let me know about this and thank you very much.
It’s a 100% bulletproof to embed it in your theme. That’s what Redux told me:Redux Core is and will always be free. You can use it as a plugin or embed it in your theme. To embed, check out our embedding docs here: https://github.com/ReduxFramework/ReduxFramework/wiki/Embedding%20Redux%20in%20Your%20Theme%20or%20PluginCheers and happy embedding
You are welcome to use it in your premium products.
We do have some premium features that we’re actually releasing this weekend that have different licensing attached. Such as metaboxes, widget_areas, and shortcodes. You can learn about that here (sorry it looks aweful right now): http://reduxframework.wpengine.com/extensions/Have a good day.
It’s really great that we can embed the Redux Framework in our themes, but I’m still confused about what exactly are we supposed to include as plugins. For instance, apart from the Redux Framework, I’m also using ‘Portfolio Post Type’ plugin, ‘Custom Sidebars’ plugin from the Wordpress.org and my own Theme’s Shortcodes as a plugin, all of which I’m including through TGM. Now Apart from the Shortcodes, I really can’t see how the users will be able to use the Portfolio content and custom sidebars in the other theme if that theme doesn’t use the same plugin, and doesn’t have similar configuration.
Also in the Wordpress Theme Submission Requirement it just says that ’...Bundled plugins should be included via the TGM plugin…’, which doesn’t really clear my confusion. Does anyone know if there is another article in which this is discussed in more details? I would very much appreciate it as I remember reading about this in much more detail, but I just can’t find that resource.
Thanks and regards.
This is fantastic. Thank you guys for the replies, saved me a lot of worry. Especially thank you for the links ThemeWarriors and Themefusion, I’m confident now to embed it in my theme.
eriktailor saidHi eriktailor,
Hi sunnywill, You should definately use it with TGM, you’re not allowed to integrate and sell with your theme.
Thank you so much for the reply. Can you please also clarify if you mean I’m not allowed to sell it with my theme because of the Redux framework license or because of the themeforest requirements? Because it says in Redux framework website that we are allowed to use it in a commercial project.
Also I am having a problem while using it with TGM that Redux framework by default gives an option to the users to try it’s demo settings, through a sample activate file, which will override mine, and which I”m still trying to figure out how to disable. Please let me know if you know about this problem and how to solve it.
Thanks again and regards.
I’m creating a wordpress theme and I want to know if I can integrate the Redux framework plugin in my theme or do I need to let TGM plugin let users install it? Since this plugin will only handle the settings of my particular theme, I figure there would be no harm if people lose those settings when the change to a different theme.
Please let me know about this, will really help me move forward.
Thanks and regards.