Posts by sunnywill

43 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 0-1 years
sunnywill says

I ended up using version_compare function of Php. Here is a more detailed tutorial on how to use it to compare the Wordpress version.

43 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 0-1 years
sunnywill says

Thank you for sharing. Using your code, I was able to fix my Popup window code which was not working in the new version.

However, I’m currently doing some testing with previous versions and I found that for versions such as 3.8.3, 3.8.2 (and other versions with 2 decimal points), this will break. As the JavaScript Comparison operator: ‘less than’ (<) doesn’t recognize these version numbers as they are technically not valid numbers… because they have 2 decimal points.

Anyway, I just found out this problem and I’m trying to find an efficient solution to this. Please share if someone knows the solution. Don’t think it would be too difficult.

Thanks again and regards.

43 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 0-1 years
sunnywill says

Hello,

Just one thing that I’m curious about, regarding the requirements, is whether there is any required or otherwise recommended version of WordPress that we need to support. I see that a lot of themes show the versions that are supported, usually from 3.5 upwards. Also I see that when uploading an item there is a list of the versions that we want to support, but I would still like to know or read more about this.

I’m sorry, if this is too obvious and I know that you guys have worked hard in documenting all the requirements, but still it would be great for me to have this cleared up.

Thank you and regards.

43 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 0-1 years
sunnywill says

Thank you for letting us know. Cheers!

43 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 0-1 years
sunnywill says

Hello,

Regarding the Phase 2 or the requirements, it says that it would be published sometime after March 2014, which was last month, and I’m concerned about how will this take effect. I wanted to know if there would be some kind of grace period between the time the new requirements are published and the time when they would actually take effect.

As I am currently in the final stages of creating my theme, which is based on the current Phase 1 of the requirements, and I assume it would be quite a trouble to make changes to the theme, which could even be drastic depending on the Phase 2 requirements.

So please let me know how the new requirements would take effect, and I humbly suggest that there is some kind of grace period for the developers that are currently following the Phase 1 requirements, so we can submit the theme before the new requirements take effect.

I see that OP did mention how the requirements will take effect in the last paragraph, but I’m still not sure regarding this.

Thank you and regards.

43 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 0-1 years
sunnywill says

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
That’s one thing that I really can’t understand.Do we make a plugin with our custom portfolio page,custom contact page etc or we can leave it in the theme ? Very confusing.
From what I have understood, it is no longer ThemeForest requirement to have custom post types or anything else in a separate plugin, except you only have to use TGM or similar plugin to make users install any External or Bundled plugins. If you want to have something embedded in you theme, than you are free to do so.

For example, I’m going to use Redux Framework for the Theme options for the theme that I’m creating, which I’ve decided to embed in my theme. So for this I don’t need to use it as a plugin at all. Also, I’m using Contact Form 7 as a plugin, so I’ll use TGM to allow users to install it directly from the Wordpress repo.

This is from the best of my knowledge and understanding and I’m not 100% sure.

43 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 0-1 years
sunnywill says

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?

43 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 0-1 years
sunnywill says

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.

Thanks.

43 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 0-1 years
sunnywill says

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

43 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 0-1 years
sunnywill says

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?

by
by
by
by
by
by