i have an issue with dirname(__FILE__) from radium demo install, and tgm activation plugin



the reviewer ask me to change dirname(FILE) code on my theme, but its from radium demo install, and tgm activation plugin

how to explain to reviewer, since many another themeforest theme using it, and redux also using dirname(FILE) a lot


Hi vinirama.

Just change it to get_template_directory() .’/PATH_TO_THE_FILE_FROM_THEME_ROOT_HERE’ and you are done.



hi djmi many themeforest themes using radium, redux and tgm with dirname(FILE) attached,
so may be i can just explain to reviewer, it’ll cost a problem when the librarys get update


Hi vinirama.

It new policy, I received same message, changed like I showed you and they did not bugged me again :smiley:

Move redux to plugin



I am just curious, why is not dirname(FILE) correct?
It will always reflect the correct path and it’s the correct approach to reference the current directory you are in, in case you are using php < 5.3 and you cannot use DIR constant.


Thank you very much for all your comments are of great help.

Thank you