Links in popup windows now target different window.
git-svn-id: http://svn.automattic.com/wordpress/trunk@111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2bed810184
commit
fe76341b15
|
@ -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);
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
<?php /* Don't remove this line, it calls the b2 function files ! */
|
||||
$blog=1; include ("blog.header.php"); while($row = mysql_fetch_object($result)) { start_b2();
|
||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
$blog=1;
|
||||
include('blog.header.php');
|
||||
add_filter('comment_text', 'popuplinks');
|
||||
while($row = mysql_fetch_object($result)) { start_b2();
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title><?php echo $blogname ?> - Comments on "<?php the_title() ?>"</title>
|
||||
|
@ -11,13 +14,12 @@ $blog=1; include ("blog.header.php"); while($row = mysql_fetch_object($result))
|
|||
@import url( layout2b.css );
|
||||
body { margin: 3px; }
|
||||
</style>
|
||||
<link rel="stylesheet" type="text/css" media="print" href="<?php echo $siteurl; ?>/print.css" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<body id="commentspopup">
|
||||
|
||||
<h1 id="header"><a href="" title="<?php echo $blogname ?>"><?php echo $blogname ?></a></h1>
|
||||
|
||||
<div id="contentcomments">
|
||||
<h2>Comments</h2>
|
||||
<ol id="comments">
|
||||
|
||||
|
@ -94,7 +96,6 @@ QQQ;
|
|||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- // this is just the end of the motor - don't touch that line either :) -->
|
||||
|
|
Loading…
Reference in New Issue