Uses
Uses | Description |
---|---|
wp-includes/formatting.php: esc_attr() | Escaping for HTML attributes. |
This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
Callback to add a target attribute to all links in passed content.
(string) (Required) The matched link.
(string) The processed link.
File: wp-includes/formatting.php
function _links_add_target( $m ) { global $_links_add_target; $tag = $m[1]; $link = preg_replace( '|( target=([\'"])(.*?)\2)|i', '', $m[2] ); return '<' . $tag . $link . ' target="' . esc_attr( $_links_add_target ) . '">'; }
Version | Description |
---|---|
2.7.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/_links_add_target