Some plugins adding full server path after url (with custom wp-content folder)

Given that the js location is determined as follows:

$js_location = WPSEO_URL . 'js/wp-seo-admin-global.js'

where:

WPSEO_URL = WP_PLUGIN_URL . "https://wordpress.stackexchange.com/" . <WP_SEO_PLUGIN_PATH> . "https://wordpress.stackexchange.com/"

I suspect the problem lies with the derivation of <WP_SEO_PLUGIN_PATH>. This value is determined by the code in the function plugins_url() found in wp-includes\link-template.php

If you debug that function, it may yield the reason why <WP_SEO_PLUGIN_PATH> is producing the wrong value: ‘nfs/c08/h04/mnt/152547/domains/craigmdennis.com/html/content/plugins/wordpress-seo’

Leave a Comment