36 posts
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 2 years
neutrico says


1. ThemeCheck reports error on lack of closing head and body tags, while it’s perfectly valid to omit these tags in HTML5
Is there a technical need to omit the closing head and body tags? Otherwise, I think you should include them for the sake of readability. Just because you can omit something, doesn’t necessarily mean you should, as with the curly brace requirement.

Of course, there is no need. But code without closing tags is still valid – and if it’s valid why report it as wrong? Just from logical point of view. And it’s easier to edit files that are 100% PHP. For example some editors/IDE’s complain that you have unpaired closing tag in footer.php



2. Do we need to strictly follow all WordPress Coding Standards specifically mentioned in http://goo.gl/ub4mY ? It could be nice to start using PHP namespaces and autoloaders. And it’s very difficult if not impossible to follow WP Naming Conventions with SPL Autoloader.
We haven’t said that you need to strictly follow all those standards at this point, but it’d be nice if you could aim for them. As for namespaces etc. it’s probably not practical to start early-adopting PHP features that are going to cause you support problems with customers who’s hosting cannot handle them.

Namespaces can cause some support problems – but in opposite it’s easier to maintain packages containing theme classes, plugins etc. with Composer.



3. WordPress Assets… How can we enqueue all stylesheets with wp_enqueue_style and support for example custom Google Fonts? Are tools like Google Web Font Loader, Google Loader, Modernizr.load, RequireJS which loads scripts and styles asynchonously forbidden from now?
Can you explain why this can’t be done using wp_enqueue_style or wp_enqueue_script?
Submission Requirements states: “wp_enqueue_style() must be used to enqueue all stylesheets”

For example: with Google Web Font Loader you can use wp_enqueue_script to get this script which then loads CSS with fonts asynchronously with no server side scripting. So, in this way CSS styles are loaded without wp_enueue_style. Is this allowed or prohibited?

Thank you very much for answers.

I will just repeat my first question: Is TGM a must have from now?

601 posts uouapps
  • Has been part of the Envato Community for over 1 year
  • Has referred 10+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 100+ items on Envato Market
+3 more
uouapps says


Some of my shortcodes are bootstrap driven, does this mean I have to supply the bootstrap css and javascript within a plugin, is this not a theme thing?

This might have to be a case-by-case scenario left to the reviewer’s discretion.

Personally, I would try to keep generic styling and scripting in the plugin, to then customise with further styling across my themes.

Hi Japh,

This thread will probably reach a 100 pages within a week, as far as every answer is crucial and currently there’s no search engine within a thread, would it be possible to organize in the envato knowledge base a Q&A structured per topic ?

some people will be asking same questions, others will be asking different questions but within the same topic so it would really facilitate our lives if this thread could be more optimized.

Thanks in advance Cheers UOU Apps

373 posts WordPress Guy
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Located in Australia
+4 more
Japh says

Of course, there is no need. But code without closing tags is still valid – and if it’s valid why report it as wrong? Just from logical point of view. And it’s easier to edit files that are 100% PHP. For example some editors/IDE’s complain that you have unpaired closing tag in footer.php

Our policy, is that it is required. As with the requirement for curly braces. It improves overall readability, and there’s no good reason not to include it.


Namespaces can cause some support problems – but in opposite it’s easier to maintain packages containing theme classes, plugins etc. with Composer.

It is, and it will be a happy day when this is practical to apply in the context of a theme marketplace :)


Submission Requirements states: “wp_enqueue_style() must be used to enqueue all stylesheets” For example: with Google Web Font Loader you can use wp_enqueue_script to get this script which then loads CSS with fonts asynchronously with no server side scripting. So, in this way CSS styles are loaded without wp_enueue_style. Is this allowed or prohibited?

I don’t see any immediate issues with this. The problem we’re wanting to avoid is authors hard-coding <script src="filepath"></script> tags in their themes. Asynchronous loading via JavaScript where necessary isn’t an issue.


I will just repeat my first question: Is TGM a must have from now?

As mentioned previously, for the moment we are saying to use TGM, but I am seeking clarification from the review team on whether we might also allow other libraries that perform the same function.

373 posts WordPress Guy
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Located in Australia
+4 more
Japh says

You have a mistake in the PHP section #5, which conflicts with the “child theme” rule. Your code:
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/filename.png" />

Instead of using get_stylesheet_directory_uri(), themes should almost always use get_template_directory_uri().

I know this is just an example, but if you want to facilitate the use of child themes, the themes here need to be referencing the correct directory.

Thanks again for pointing this out, Justin. It’s been updated!

373 posts WordPress Guy
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Located in Australia
+4 more
Japh says

As suggested by uouapps, I’ve attempted to collate a basic Q&A of what’s been covered so far here: ThemeForest’s WordPress Theme Submission Requirements Q&A

Hopefully you guys find this useful, if not, that’s ok too :) I will try and keep it up-to-date with any significant new questions / answers. Let me know if you feel I’ve missed something.

Please do not comment there, it is for reference and easy access only.


Hi Japh,

This thread will probably reach a 100 pages within a week, as far as every answer is crucial and currently there’s no search engine within a thread, would it be possible to organize in the envato knowledge base a Q&A structured per topic ?

some people will be asking same questions, others will be asking different questions but within the same topic so it would really facilitate our lives if this thread could be more optimized.

Thanks in advance Cheers UOU Apps
2023 posts Review Manager
  • Has referred 10+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Member of the Envato Team
+12 more
jremick Envato team says

Hi everyone,

We’ll try to organize this Q & A in a better place such as our knowledgebase, but we’ll continue compiling information for a period of time before we’ll be able to get this fully in place and can use Japh’s initial solution as a sort of drafting grounds. :-)

78 posts
  • Has referred 100+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Has been part of the Envato Community for over 6 years
+2 more
adiacone says

Hi everyone, We’ll try to organize this Q & A in a better place such as our knowledgebase, but we’ll continue compiling information for a period of time before we’ll be able to get this fully in place and can use Japh’s initial solution as a sort of drafting grounds. :-)

Awesome!

3 posts
  • Has been part of the Envato Community for over 1 year
aesti says

Hello,

In the FAQ section Q3 you say that “There’s really no need to do this” (i.e. “using a public CDN version of jQuery”).

The version of jQuery packaged with WordPress weights about 90KB. The popularity of the Google CDN, as many websites use it for the jQuery library, results on most people having all common versions of jQuery already cached in their web browser. For those who don’t, Google delivers jQuery gzipped and with a cache rule of 1 year.

That means that if you visited any website that loads the targeted version of jQuery from Google CDN for the past year, you are likely to already have this jQuery version in your web browser’s cache.

Even themeforest.net itself loads jQuery from Google CDN:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write("<script src='http://3.envato-static.com/assets/jquery-74706bae09255db777f0225ef9b18892.js'><\/script>")</script>

Besides, most buyers don’t know how to optimize the performance of their websites, nor how to use and configure W3TC in order to gzip javascript files. That means that leaving the default version of jQuery packaged with WordPress will result, for most buyers, to having a website that loads 90KB of javascript and that is not cached in the browser (i.e. when the website’s visitors will visit the site again they will have to load the full 90KB again, on each browsing session).

I’m having difficulties accepting your “there’s really no need to do this” reply when we’re talking about avoiding the load of additional 90KB for any theme by default.

Page-load speed optimization is a real concern, fast loading websites see their conversion rate increase, with an improved bounce rate, more time spent on the site and generally happier users. Not to mention the SEO benefit of such improvement.

Also, page-load speed optimization is a fulltime job that requires highly specialized skills. Most developers don’t meet these skills, and you can’t expect from most buyers to even understand the implication (just like yourself) nor to optimize the speed of their newly purchased theme by themselves.

By imposing strict standards you are preventing innovation in this area, and this is very unfortunate. It’s not because plugins like W3TC exist that themes cannot be fully optimized at first. In the say way, services like Google PageSpeed Service (or the mod_pagespeed if you prefer) cannot replace the real job of a specialized web developer to build, optimize, prioritize, structure and improve efficiency in the best way possible to provide the most incredibly fast loading website.

I am not against rules to up the quality level (like for example no hard-coded css/js calls), but I am totally against standards preventing competent developers to do their best to provide the best product they can, and this is exactly what you’re doing with this rule.

Developers should be free to load the most recent version of jQuery from wherever they want, however they want, using whatever technique they think is faster. Compatibility concern can be assured on-demand via an option in the admin to restore the old API (i.e. jQuery Migrate) or use an old version of jQuery (i.e. the one packaged with WordPress), and this possibility should be mandatory.

Deregistering the default jQuery, when done right, is a must-do for all themes.

280 posts
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
PrimaThemes says

Developers should be free to load the most recent version of jQuery from wherever they want, however they want, using whatever technique they think is faster. Compatibility concern can be assured on-demand via an option in the admin to restore the old API (i.e. jQuery Migrate) or use an old version of jQuery (i.e. the one packaged with WordPress), and this possibility should be mandatory.

Deregistering the default jQuery, when done right, is a must-do for all themes.

If user want to use jQuery Google CDN, they can install this WordPress plugin (for example), http://wordpress.org/plugins/use-google-libraries/
373 posts WordPress Guy
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Located in Australia
+4 more
Japh says

I’m having difficulties accepting your “there’s really no need to do this” reply when we’re talking about avoiding the load of additional 90KB for any theme by default.

Thanks for your feedback, however, as PrimaThemes points out…


If user want to use jQuery Google CDN, they can install this WordPress plugin (for example), http://wordpress.org/plugins/use-google-libraries/

My point is, this should not be done in a theme.

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