WP_PLUGIN_DIR and plugins_url() not compatible ?
-
Hello,
I’m a plugin developper and I saw something weird, I don’t know if it’s me or it’s normal.
When I setup WP_PLUGIN_DIR, it seems the function plugins_url() does not retrieve the good path.
For exemple, into wp-config.php if I put :
define( 'WP_PLUGIN_DIR', dirname(__FILE__) . '/wp-content/plugin_new_folder' );
My plugins go into wp-content/plugin_new_folder/.
Now into one of my plugin I put something like :
wp_enqueue_style( 'my-css', plugins_url( 'assets/css/my-css.css', __FILE__ ) );
If I load my plugin page, there is a 404 error, the css stylesheet loaded folder “plugin”, and not “plugin_new_folder”.Anyone has an idea why ?
Thanks for your help.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WP_PLUGIN_DIR and plugins_url() not compatible ?’ is closed to new replies.