Ok, this is ugly and hackerish, but it looks to me like the plugin tends to clobber external urls in scripts…it just strips off the URL path, and assumes that all paths to enqueued javascripts are internal.
Well, so, if you are willing to use the blacklist on the General settings page for both internal pages that shouldn’t be read and for external scripts, it seems to work fine to replace the proper_root_relative_url function in the plugin with one that blocks those scripts from being considered.
So here’s the code I used:
static function proper_root_relative_url($url) {
//This method is used for urls that can be acceptably reformatted into root-relative urls without causing issues
//related to other deficiencies in the wp core.
// HACK : EWO added middle term to if statement below, changed return string on first clause.
$url_parsed=@parse_url($url); $host_plus_path=$url_parsed['host'] . $url_parsed['path'];
if (self::$massage) {
//massage back to absolute because we're rendering a feed and the platform mixes url procurment methods between the delivery methods
//despite offering _rss specific filters
return $url;
// return MP_WP_Root_Relative_URLS::dynamic_absolute_url($url);
} elseif ( (string)stripos(get_option('emc2_blacklist_urls'), $host_plus_path ) !== "") {
self::$massage = true;
#error_log("url REJECTED" . $url );
return $url;
} else {
$url = @parse_url($url);
if (!isset($url['path'])) $url['path'] = '';
return '/' . ltrim(@$url['path'], '/') .
(isset($url['query']) ? "?" . $url['query'] : '') .
(isset($url['fragment']) ? '#' . $url['fragment'] : '');
}
}
I know little about wordpress, so use this at your own risk!
The only drawback I now see to this plugin is that it totally doesn’t respect any sistemap generators that I can find. If someone knows a way around hit, please let me know!
cheers,
Eric