50 posts
  • Sold between 10 000 and 50 000 dollars
  • Exclusive Author
  • Has been a member for 1-2 years
  • Referred between 10 and 49 users
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
  • Exclusive Author
  • Has been a member for 0-1 years
  • United Kingdom
webinest says

Have you opened a support ticket with Envato?

Perhaps they missed the ‘st’ bit.

1612 posts
  • Author had a Free File of the Month
  • Sold between 1 000 and 5 000 dollars
  • Exclusive Author
  • Has been a member for 1-2 years
  • Bought between 100 and 499 items
  • Referred between 1 and 9 users
  • Contributed a Blog Post
  • Contributed a Tutorial to a Tuts+ Site
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+5 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?

6765 posts
  • Italy
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Beta Tester
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Author had a Free File of the Month
  • Bought between 10 and 49 items
+1 more
doru says

st may be two short or to common

can you use “st_” in wordpress?

50 posts
  • Sold between 10 000 and 50 000 dollars
  • Exclusive Author
  • Has been a member for 1-2 years
  • Referred between 10 and 49 users
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’.

190 posts
  • Attended a Community Meetup
  • Elite Author
  • Bought between 50 and 99 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 200 and 499 users
  • Sold between 250 000 and 1 000 000 dollars
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
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 1 000 and 5 000 dollars
  • United States
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.

190 posts
  • Attended a Community Meetup
  • Elite Author
  • Bought between 50 and 99 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 200 and 499 users
  • Sold between 250 000 and 1 000 000 dollars
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