I’m getting soft reject on my WordPress theme again and again. Reasons are technical.
I’m using Codestar Framework in my theme. Which have problems with textdomains. Also using lessphp to compile css from less. It uses file_get_contents() and file_put_contents() which triggers error in theme check.
I always collect free files each month. Test them with theme check. And the result I see, it always surprises me. Their framework has thousands of errors, warnings, recommends and infos. Also some themes has error inside code without any framework. How they got approved when I couldn’t?
In the message to reviewer field, I’ve mentioned what I’m using and what errors they give me in theme check.
Eventually I get soft reject and they ask me to fix errors from the frameworks I’m using.
Shows error with textdomain, ‘add_menu_page’ and ‘add_submenu_page’. They says I need to fix them.
Shows error with file_get_contents() and file_put_contents(). They says I have to use WP_Filesystem instead.
Ok, I’ve fixed all of them and resubmitted. Now again got a brand new soft reject message, with 6 issues.
I’ve figured out most of them. Now problem with a few things.
Theme needs to properly load files. There are several functions available for getting the path:
get_template_directory(): Returns the absolute template directory path.
get_template_directory_uri(): Returns the template directory URI.
get_stylesheet_directory(): Returns the absolute stylesheet directory path.
get_stylesheet_directory_uri(): Returns the stylesheet directory URI.
Include files via get_template_directory() and not with locate_template because you’re not loading WordPress templates and core is very specific when it comes what is loading.
I know these issues are from the frameworks I’m using. The codestar framework has a function called cs_locate_template() and they don’t use get_template_directory() or get_stylesheet_directory() to load files.
Now what should I do about this?
Also there one more issue I’m facing. For last 3 rejection I’m getting this:
Data Validation issues have been found in your theme. All dynamic data must be correctly escaped for the context where it is rendered.
- All dynamic data must be escaped with esc_attr() before rendered in an html attribute.
- Whenever you are rendering a url to the screen its value must be passed through esc_url() first.
Now, I’ve checked line by line, all datas are escaped. But reviewer still says this. Is there any proper way for me to troubleshot the data validation issues? or how do I know that my theme has data validation issues?
Thanks in advanced.