Skip to content

Filtering referrer on links

William Patton edited this page Sep 24, 2025 · 1 revision

For anyone that deploys this plugin as part of their site builds or integrations there exists a filter that your referrer value can be added to the links.

You could deploy this filter as an mu-plugin, or just inside your own plugins or themes. Replace 'williamrefer' with your own referral id.

add_filter(
	'edac_filter_generate_link_type_ref',
	function ( $ref ) {
		if ( ! $ref ) {
			$ref = 'williamrefer';
		}
		return $ref;
	}
);

Clone this wiki locally