Bei einigen Partnerprogrammen wie Skimlinks werden externe Links auf Ihrem Blog mit Hilfe eines On-Page-Javascript erkannt, das Sie auf Ihrer Website laden müssen.
Dies stellt ein Problem dar, da ThirstyAffiliates, wenn es mit dem Autolinker gekoppelt ist, automatisch den getarnten Partnerlink verwendet.
We created this snippet of code which tells the Autolinker to use the destination URL instead of the cloaked URL which means it’s now compatible with tools like Skimlinks.
function swapDestinationURLAutolinker($linkAttributes, $linkID) {
if (!is_admin()) {
$linkData = unserialize(get_post_meta($linkID, 'thirstyData', true));
$destinationUrl = htmlspecialchars_decode($linkData['linkurl'], ENT_COMPAT);
$linkAttributes['href'] = $destinationUrl;
}
return $linkAttributes;
}
add_filter('thirstyFilterLinkAttributesBeforeInsert', 'swapDestinationURLAutolinker', 10, 2);