Enable and Disable Error reporting in wordpress

To Enable Error Reporting

define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_LOG’, true);
define(‘WP_DEBUG_DISPLAY’, true);
@ini_set(‘display_errors’, 1);

To Disable Error Reporting

define(‘WP_DEBUG’, false);
define(‘WP_DEBUG_LOG’, false);
define(‘WP_DEBUG_DISPLAY’, false);
@ini_set(‘display_errors’, 0);

Advertisements

Ignore gclid(Google Click ID) parameter in wordpress SEO

I found a way to ignore gclid parameter (Adwords automatic tracking) by added in the following lines in the wp-cache-config.php (in the wp-content folder) :

$param = "gclid";
unset($_GET[$param]);
list($urlRoot, $params) = array_pad(explode('?', $_SERVER[ 'REQUEST_URI' ]), 2, '');
if (!empty($params)) {
	parse_str($params, $vars);
	unset($vars[$param]);
	if (count($vars) > 0) {
		$newParams = http_build_query($vars);
		$_SERVER[ 'REQUEST_URI' ] = $urlRoot . '?' . $newParams;
	}
	else {
		$_SERVER[ 'REQUEST_URI' ] = $urlRoot;
	}
}