jzn123 (@jzn123)

Forum Replies Created

Viewing 1 replies (of 1 total)
  • @jzn123

    Participant

    I am using this version, but it’s not working with bbPress v1.1

    Has someone a clue?

    <?php
    
    /*
    
    Plugin Name: Target Blank
    
    Description:  append target="_blank" to all links
    
    Plugin URI:  http://ckon.wordpress.com/2007/07/12/bbpress-plugin-bb-tweaks/
    
    Author:  _ck_
    
    Version: 0.04
    
    */
    
    //add target=_blank to post links
    
    function bb_target_blank( $text ) {
    
    $text = preg_replace('|<a (.+?)>|i', '<a $1 target="_blank">', $text);
    
    return $text;
    
    }
    
    add_filter('pre_post', 'bb_target_blank');
    
    ?>
Viewing 1 replies (of 1 total)