A WordPress plugin to find links for affiliate partners in post content and add their tracking tags. The plugin also provides filters to use on other fields or content types.
Locations to search for links. Should be (mostly) valid HTML.
Default:
$locations = array(
'the_content',
'the_content_feed',
'comment_text',
'comment_text_rss',
);
Locations to replace links. Good for adding affiliate links to custom post meta that are known to be links.
Default:
$locations = array();
Filters to run links through to add affiliate codes. Used internally to add new affiliate programs.
Default: None.
List of Amazon affiliate tags per country.
Default:
$tags = array(
'at' => '',
'ca' => '',
'de' => '',
'es' => '',
'fr' => '',
'it' => '',
'jp' => '',
'uk' => '',
'us' => '',
);
Example:
add_filter( 'shadow_money_amazon_affiliate_tags', function( $tags ) {
$tags['us'] = 'xxxxxxxxxx-20';
return $tags;
} );