What I learned in the Recent ThemeForest Review Process

After multiple soft rejections, my WordPress theme Jordan finally got approved yesterday. It has been a nearly one and a half years since my previous WordPress theme was approved. To me, the recent review process at ThemeForest is even stricter than before, and I would like to share what I have learned in the new theme review process. Hopefully, this can help other authors get their themes approved faster.

1. Make sure the HTML code is W3C valid

After your WordPress theme is finished, go to validator.w3.org, check every page generated of your theme, and eliminate all the errors / warnings. Missing a closing tag and mismatch of tags are two of the frequently seen errors. I also often come across the warning of missing a h2 — h6 tag within a section tag, and the way I resolve this is to add a hidden h2 — h6 tag.

The sharing code of YouTube / Vimeo will cause some some errors in the validator. However, the reviewer will know this and you do not need to fix these errors.

2. Make sure that the theme is minimally functional

This means that the theme should be working well even without your own demo content imported or any plugin installed. The reviewers at ThemeForest will install your theme without importing your demo data, and use the Theme Unit Test Data and Monster Widget to check the basic styling of your theme, including the styling of sticky post, comments, multi-level menu, and widgets.

3. Make sure that the theme is properly prefixed

Functions, classes, hooks and filters, global variables, constants, etc in your theme should have a unique prefix. This also extends to the names of fields in the Advanced Custom Fields plugin if you are using it in your theme. However, there is one exception: do not prefix the handles of third-party JavaScript / CSS libraries to avoid double loading.

4. Do not embed plugins into the theme

Before, plugins such as Advanced Custom Fields, the Redux Framework etc could be embedded to the theme and loaded in functions.php, and the theme would still pass the review. This is no longer acceptable in the new review process, since a lot of plugins are calling functions that belong only to the plugin territory such as dirname() and opendir().

The solution to this is to load these plugins using TGMPA. If the plugin is available in the WordPress plugin repository, link them in the TGMPA configuration file. If the plugin is not available in the repository, you can put the plugin’s zip file in your theme and use TGMPA to load them.

5. Custom post type is a plugin territory

The new review requires the process of creating custom post types be completed through a plugin. This means that you will need to put the PHP code that defines custom post types into a plugin, zip the plugin and load it using TGMPA. An example of such as plugin can be found here.

6. Escape translations properly.

In the new review process, using __() or _e() is no longer acceptable. You must use esc_html__() or esc_html_e() instead. if there has to be HTML code in __(), you will need to wrap it using wp_kses(). This is to ensure that the translator will not inject any harmful HTML code during translation.

7. Use Theme Check instead of ThemeForest Check

After finishing your theme, using the Theme Check plugin instead of the ThemeForest Check plugin to check your theme, since the standard of ThemeForest Check is more relaxed and no longer applicable to the new review process. Make sure your theme doesn’t generate any errors or warning except the warning of the additional text domain of TGMPA and the warning of the zip files of your plugins which are going to be loaded through TGMPA.

Final Thoughts

That’s what I learned in the new theme review process. Fixing these problems before submitting the theme for review can reduce the number of soft rejections and your frustrations. Hope this helps!

Author: Simon Li

Designer, coder and animator.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>