Components used in Themes and Plugins: How to get file URL?
Is there a way to determine if my current PHP file is within the plugins’ folder or within the themes’ folder Broadly you always have path to current file (__FILE__) so you can always examine it for where you are and compare with context. This might be good enough in custom site, but likely too … Read more