I'm trying to get a url to my plugin, but plugins_url function returns an incorrect one.
in main plugin file there's this line:
$this->plugin_url = plugins_url( '/', __FILE__ );
Note, I've changed my plugins folder through wp-config.php
:
...
define( 'WP_PLUGIN_DIR', '/home/victor/hg/' );
define( 'WP_PLUGIN_URL', 'http://hg.victorpc.org' );
...
hg.victorpc.org
is a vhost with document root set to /home/victor/hg
the function returns this URL http://hg.victorpc.org/home/victor/hg/<plugin-folder>
and the correct is http://hg.victorpc.org/hg/<plugin-folder>