Comments: Remove a one-time variable in `wp_rel_nofollow()` and `wp_rel_ugc()`.

See #48022.
Built from https://develop.svn.wordpress.org/trunk@46396


git-svn-id: http://core.svn.wordpress.org/trunk@46195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-10-05 00:56:57 +00:00
parent 83edc24762
commit f1e54593f0
2 changed files with 7 additions and 9 deletions

View File

@ -3063,13 +3063,12 @@ function wp_rel_callback( $matches, $rel ) {
* @return string Converted content.
*/
function wp_rel_nofollow( $text ) {
// This is a pre save filter, so text is already escaped.
// This is a pre-save filter, so text is already escaped.
$text = stripslashes( $text );
$rel = 'nofollow';
$text = preg_replace_callback(
'|<a (.+?)>|i',
function( $matches ) use ( $rel ) {
return wp_rel_callback( $matches, $rel );
function( $matches ) {
return wp_rel_callback( $matches, 'nofollow' );
},
$text
);
@ -3098,13 +3097,12 @@ function wp_rel_nofollow_callback( $matches ) {
* @return string Converted content.
*/
function wp_rel_ugc( $text ) {
// This is a pre save filter, so text is already escaped.
// This is a pre-save filter, so text is already escaped.
$text = stripslashes( $text );
$rel = 'nofollow ugc';
$text = preg_replace_callback(
'|<a (.+?)>|i',
function( $matches ) use ( $rel ) {
return wp_rel_callback( $matches, $rel );
function( $matches ) {
return wp_rel_callback( $matches, 'nofollow ugc' );
},
$text
);

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-beta2-46395';
$wp_version = '5.3-beta2-46396';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.