• Hello. I try to make one plugin wchich must put rel=”nofollow” after all links in the posts.
    Can you say me will it works?

    <?php
    // main function that does everything
    function links_nofollow($inData) {
    $inData=preg_replace(“(.*?)i”, ‘$4’, $inData);
    $inData=preg_replace(“(.*?)i”, ‘$2’, $inData);
    return $inData;
    }

    // apply filter on 2nd number, making possible for other filters to be applied before this
    add_filter(‘content_save_pre’, ‘links_nofollow’, 10);
    add_filter(‘default_content ‘, ‘links_nofollow’, 10);
    add_filter(‘default_excerpt ‘, ‘links_nofollow’, 10);
    // disable wptexturize filter
    remove_filter(‘comment_text’, ‘wptexturize’);
    ?>

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘What do you think about this plugin’ is closed to new replies.