91 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
+2 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.

1870 posts
  • Helped improve Envato sites by detecting a security issue
  • Participated in a focus group or interview to improve the user experience on Envato Market
  • Contributed a free file of the month
  • Has sold $5,000+ on Envato Market
+14 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?

8117 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
  • Has referred 10+ members
+4 more
doru says

st may be two short or to common

can you use “st_” in wordpress?

91 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
+2 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’.

202 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
+5 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.

202 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
+5 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.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by