Skip to content

Latest commit

 

History

History
78 lines (51 loc) · 1.38 KB

README.md

File metadata and controls

78 lines (51 loc) · 1.38 KB

Shadow Money for WordPress

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.

Supported Affiliate Programs

Filters

shadow_money_content_locations

Locations to search for links. Should be (mostly) valid HTML.

Default:

$locations = array(
	'the_content',
	'the_content_feed',
	'comment_text',
	'comment_text_rss',
);

shadow_money_link_locations

Locations to replace links. Good for adding affiliate links to custom post meta that are known to be links.

Default:

$locations = array();

shadow_money_link_filters

Filters to run links through to add affiliate codes. Used internally to add new affiliate programs.

Default: None.


shadow_money_amazon_affiliate_tags

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;

} );