73 posts StrictThemes
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 1 year
+3 more
StrictThemes says

I’m using these global vars in my theme:

  • $st
  • $stOptions
  • $stSettings
  • $stFramework

But the theme got rejected with reason “Your global variables should always be named in such a way as to NOT cause conflicts. Try to use a prefix for that.”

I’m already use the prefix ‘st’. Whats wrong with that variables?

87 posts
  • Has been part of the Envato Community for over 1 year
  • Sells items exclusively on Envato Market
  • Located in United Kingdom
webinest says

Have you opened a support ticket with Envato?

Perhaps they missed the ‘st’ bit.

1832 posts
  • Provided great feedback to improve the user experience on Envato Market
  • Contributed a free file of the month
  • Has sold $1,000+ on Envato Market
  • Sells items exclusively on Envato Market
+13 more
SamBerson says

I don’t see any problem with those variables, so like Webinest suggested, I would open a support ticket with Envato to ask for more info on it. Did you get a Soft or Hard reject?

7647 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $40,000+ on Envato Market
  • Sells items exclusively on Envato Market
  • Located in Europe
+5 more
doru says

st may be two short or to common

can you use “st_” in wordpress?

73 posts StrictThemes
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 1 year
+3 more
StrictThemes says

I’ve replaced ’$st…’ prefix within ’$st_…’ and the theme has been approved. Till now I’m not sure about the problem with ’$st’.

200 posts
  • Has referred 200+ members
  • Has sold $500,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Attended one of our Meetups around the world
+4 more
themeva says

I’m getting the same reason for soft rejection – however I have a prefix of $nv_ already ( previous username ) – the reviewer isn’t giving an example, so I’ve no idea if that’s what they mean or not.

So frustrating that I now have to wait another 24hrs to see by trial and error if that is the issue or not.

158 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 50+ members
  • Has sold $1,000+ on Envato Market
  • Sells items exclusively on Envato Market
+1 more
greenshady says

The best way to prefix these things is to actually use your theme folder name like so:

$themename_some_var // global variable

themename_some_func() // function

themename_some_hook // hook

THEMENAME_SOME_CONSTANT // constant

Themename_Some_Class // class

theme-folder // textdomain

themename-thumbnail // custom image size

themename_meta // custom metadata

_themename_meta // custom hidden metadata

themename_some_option // custom options

Anything within the public namespace should be prefixed.

That’s the standard most WordPress theme/plugin authors should be following. Of course, if your theme name is pretty long, you might want to consider shortening your prefix.

Using a two-letter prefix, while mostly safe, can still lead to conflicts because it’s not very unique. It’s a heck of a lot better than no prefix though. If you’re using the same two-letter prefix across multiple themes, it’s especially not a good idea if that prefix deals with saving data (metadata, options, etc.) because data might be different between themes.

200 posts
  • Has referred 200+ members
  • Has sold $500,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Attended one of our Meetups around the world
+4 more
themeva says

Thanks for the clarification! It was due to a couple of vars I had missed, however I’m going to change the prefix to something more descriptive as you suggested.

by
by
by
by
by
by