Incorrect style/script URLs enqueued when WordPress installed in a custom dir
-
When WordPress is installed to to its own directory and wp-content is in the top level rather than the WordPress directory the plugin enqueues the incorrect URL to the stylesheet and script.
Example paths:
wp core: /home/username/www/wordpress/
wp content: /home/username/www/wp-content/Line 34 from plugin.php:
$PLUGIN_URL = get_option('siteurl') . '/wp-content/plugins/' . plugin_basename(dirname(__FILE__));
Should probably be:
$PLUGIN_URL = plugins_url( '', __FILE__ );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Incorrect style/script URLs enqueued when WordPress installed in a custom dir’ is closed to new replies.