[Plugin: Google Analytics for WordPress] Remove extra whitespace from markup of tracked outbound lin
-
The plugin was adding unnecessary whitespace to
<a>
markup of my site, like between the ” and the > here:<a href="http://winkpress.com/privacy-policy/" >Privacy</a>
Not a big deal I know, but because of my specific circumstances it was causing problems, so to remove the extra space, I modified lines 1042 and 1043 of googleanalytics.php to this:
$matches[4] = ($matches[4] == ' ' || empty($matches[4])) ? '' : ' ' . trim($matches[4]); return '<a ' . $matches[1] . 'href="' . $matches[2] . '//' . $matches[3] . '"' . $matches[4] . '>' . $matches[5] . '</a>';
http://wordpress.org/extend/plugins/google-analytics-for-wordpress/
- The topic ‘[Plugin: Google Analytics for WordPress] Remove extra whitespace from markup of tracked outbound lin’ is closed to new replies.