Codex tools: Log in
Contents |
Adds target='_blank' and rel='external' to all HTML Anchor tags to open links in new windows.
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.
<?php popuplinks( $text ) ?>
<?php
echo popuplinks('Please visit <a href="http://www.wordpress.com">WordPress.com</a>.');
?>
Will output:
Please visit <a href="http://www.wordpress.com" target='_blank' rel='external'>WordPress.com</a>
Since: 0.71
popuplinks() is located in wp-includes/formatting.php.