Warning: This function has been deprecated.
popuplinks() WordPress Function
The popuplinks() function enables Wordpress developers to create links that open in a new window or tab. This is useful for linking to external sites, or for creating links that open a lightbox or modal window.
popuplinks( string $text ) #
Adds element attributes to open links in new tabs.
Parameters
- $text
(string)(Required)Content to replace links to open in a new tab.
Return
(string) Content that has filtered links.
Source
File: wp-includes/deprecated.php
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 codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.5.0 | This function has been deprecated. |
0.71 | Introduced. |