popuplinks()

 

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;
}

参数:popuplinks( string $text )

Content to replace links to open in a new tab.

(字符串)已筛选链接的内容。

$text

(string)
(Required)
Content to replace links to open in a new tab.

{acontent3}

  1. echo popuplinks('Please visit <a href="http://www.wordpress.com">WordPress.com</a>.');

    will output
    Please visit WordPress.com

  2. 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>
    

You must log in before being able to contribute a note or feedback.

61.82% (34) 次Baidu访问
1.82% (1) 次Google访问
36.36% (20) 次Sogou访问
  • 蜘蛛:Baidu,34次,更新时间:2019-05-22 21:40:19
  • 蜘蛛:Google,1次,更新时间:2019-04-21 12:55:44
  • 蜘蛛:Sogou,20次,更新时间:2019-05-20 14:37:16

参与评论