Warning: This function has been deprecated.
popuplinks( string $text )
Adds element attributes to open links in new tabs.
Description Description
Parameters Parameters
- $text
-
(string) (Required) Content to replace links to open in a new tab.
Return Return
(string) Content that has filtered links.
Source Source
File: wp-includes/deprecated.php
3756 3757 3758 3759 3760 | function popuplinks( $text ) { _deprecated_function( __FUNCTION__ , '4.5.0' ); $text = preg_replace( '/<a (.+?)>/i' , "<a $1 target='_blank' rel='external'>" , $text ); return $text ; } |
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
4.5.0 | This function has been deprecated. |
0.71 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
echo
popuplinks(
'Please visit <a href="http://www.wordpress.com">WordPress.com</a>.'
);
will output
Please visit WordPress.com
Basic usage:
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
>