Make WordPress Core


Ignore:
Timestamp:
05/28/2003 08:40:34 AM (22 years ago)
Author:
saxmatt
Message:

Links in popup windows now target different window.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/b2-include/b2functions.php

    r106 r111  
    114114    $pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);
    115115    return $pee;
     116}
     117
     118function popuplinks($text) {
     119    // Comment text in popup windows should be filtered through this.
     120    // Right now it's a moderately dumb function, ideally it would detect whether
     121    // a target or rel attribute was already there and adjust its actions accordingly.
     122    $text = preg_replace('/<a (.+?)>/i', "<a $1 target='_blank' rel='external'>", $text);
     123    return $text;
    116124}
    117125
Note: See TracChangeset for help on using the changeset viewer.