Support » Plugins » Very Simple Filter causing problems

  • I’m trying to make a very simple filter for my sites. It works fine when it is installed, but every time I edit or create a new post, the admin goes to an all white page. And if you are not already logged in, you can’t get to the login page.

    Can anyone tell me what I’m doing wrong?

    The code for the plugin is below. It basicially looks for 2 variables in the URL. If they exist, it adds them to each link in the content. I’d really appreciate any help I can get on this.

    Plugin Name: Affiliate Info
    Plugin URI:
    Description: Adds affiliate info to content and commentlinks
    Author: Frank Panko
    Version: 1.15
    Author URI:

    add_filter(‘the_content’, ‘nat_affiliates’);
    add_filter(‘comment_text’, ‘nat_affiliates’);

    function nat_affiliates($text) {

    $affiliate_value = $_REQUEST[‘CLICK’];
    $click = $affiliate_value;

    $affiliate_account = $_REQUEST[‘acc’];

    $text = preg_replace(‘/<a href=”(.*?)”/’,”<a href=\”\\1&CLICK=$click\”” , $text);

    echo trim( $text );

  • The topic ‘Very Simple Filter causing problems’ is closed to new replies.