mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Links in popup windows now target different window.
git-svn-id: https://develop.svn.wordpress.org/trunk@111 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -115,6 +115,14 @@ function wpautop($pee, $br=1) {
|
||||
return $pee;
|
||||
}
|
||||
|
||||
function popuplinks($text) {
|
||||
// Comment text in popup windows should be filtered through this.
|
||||
// Right now it's a moderately dumb function, ideally it would detect whether
|
||||
// a target or rel attribute was already there and adjust its actions accordingly.
|
||||
$text = preg_replace('/<a (.+?)>/i', "<a $1 target='_blank' rel='external'>", $text);
|
||||
return $text;
|
||||
}
|
||||
|
||||
function autobrize($content) {
|
||||
$content = preg_replace("/<br>\n/", "\n", $content);
|
||||
$content = preg_replace("/<br \/>\n/", "\n", $content);
|
||||
|
||||
Reference in New Issue
Block a user