Support » Plugin: Theme Check » Add checks for affiliate links

  • Howdy, I couldn’t see any information on how to contribute, but I thought it might be good to add some checks for affiliate links. I whipped up this quick patch for it.

    If there is a git repo or trac instance or some better way to contribute, happy to contribute there instead.

    Index: checks/badthings.php
    ===================================================================
    --- checks/badthings.php	(revision 2355373)
    +++ checks/badthings.php	(working copy)
    @@ -14,7 +14,9 @@
     			'/uudecode/ims' => __( 'uudecode() is not allowed', 'theme-check' ),
     			'/str_rot13/ims' => __( 'str_rot13() is not allowed', 'theme-check' ),
     			'/cx=[0-9]{21}:[a-z0-9]{10}/' => __( 'Google search code detected', 'theme-check' ),
    -			'/pub-[0-9]{16}/i' => __( 'Google advertising code detected', 'theme-check' )
    +			'/pub-[0-9]{16}/i' => __( 'Google advertising code detected', 'theme-check' ),
    +			'/sharesale/i' => __( 'Sharesale affiliate link detected', 'theme-check' ),
    +			'/affiliate_id/i' => __( 'Potential affiliate link detected', 'theme-check' ),
     			);
     
     		$grep = '';
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Add checks for affiliate links’ is closed to new replies.