I’d like to know if there are differences in these two different usage of plugin_url(). They both produce the same string.
echo plugins_url('aaa.php')
echo plugins_url('aaa.php', dirname(__FILE__));
When is one used and the other not?
Thanks.
I’d like to know if there are differences in these two different usage of plugin_url(). They both produce the same string.
echo plugins_url('aaa.php')
echo plugins_url('aaa.php', dirname(__FILE__));
When is one used and the other not?
Thanks.
You must be logged in to post a comment.
echo plugins_url('aaa.php')
–> This is used for normal wordpress
echo plugins_url('aaa.php', dirname(__FILE__));
–> This is used for Multi network
if you define
dirname(__FILE__)
in plugins_url functionthen it takes WordPress Multi Network Plugins url
otherwise it takes Direct WordPress Plugin url