Closed cristianstan closed 8 years ago
Update:
For point #1 The dirname( FILE ) can be replaced with get_template_directory().
But for point two we tried to replace for example:
require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
with:
require_once( get_template_directory() . '/../../../wp-admin/includes/plugin-install.php' );
Its working well but they still rejects the theme!
Unfortunately, neither of the two suggestions would be acceptable for TGMPA as this library is used by both themes as well as plugins and your suggestions would not work for plugins.
Pinging @Stephen-Cronin for an official ThemeForest stance.
Thank you @jrfnl I'll wait for the answer from Stephen-Cronin
This was asked of me by one of the TF reviewers. I'm just sharing my thoughts here too.
There are legit uses for both ABSPATH
and dirname( __FILE__ )
in themes. Neither of these should be blocked. This is probably just a matter of being a little overzealous with some guidelines about including functions files with get_template_directory()
.
As far as I can tell, these are both used correctly in TGMPA.
Hey everyone, sorry for the slow reply. Didn't get to this until a couple of days ago. I threw it to the team to discuss before taking a day off. We've now finished that discussion and confirmed that there's no issues from our point of view with this (or anything else inside class-tgm-plugin-activation.php).
@cristianstan - can you please resubmit the theme (Edit > Upload again) and leave a note to the reviewer pointing to this issue?
@justintadlock - thanks for the advice, much appreciated! :)
I got a new rejection on ThemeForest because TGMPA uses some functions not allowed on themes. The functions are:
Any idea what can replace these two functions?