From f060a65a592caca8c11f1fae2e070da3b640ad07 Mon Sep 17 00:00:00 2001
From: Shalin Shah <sahilshh723@gmail.com>
Date: Tue, 23 May 2023 18:16:40 +0530
Subject: [PATCH] Concatenation is replaced with the sprintf()
---
src/wp-includes/feed.php | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/src/wp-includes/feed.php b/src/wp-includes/feed.php
index 6972f0ce75..c703a05a3a 100644
a
|
b
|
function rss2_site_icon() { |
658 | 658 | * @return string Correct link for the atom:self element. |
659 | 659 | */ |
660 | 660 | function get_self_link() { |
661 | | $host = parse_url( home_url() ); |
662 | | $url = ''; |
| 661 | $host = parse_url( home_url() ); |
| 662 | $scheme = 'http://'; |
663 | 663 | if ( isset( $host['scheme'] ) ) { |
664 | | $url .= "{$host['scheme']}://"; |
| 664 | $scheme = "{$host['scheme']}://"; |
665 | 665 | } |
666 | | $url .= $host['host']; |
| 666 | $port = ''; |
667 | 667 | if ( isset( $host['port'] ) ) { |
668 | | $url .= ":{$host['port']}"; |
| 668 | $port = ":{$host['port']}"; |
669 | 669 | } |
670 | | $url .= wp_unslash( $_SERVER['REQUEST_URI'] ); |
671 | | return set_url_scheme( $url ); |
| 670 | $request_uri = wp_unslash( $_SERVER['REQUEST_URI'] ); |
| 671 | return set_url_scheme( |
| 672 | sprintf( |
| 673 | '%1$s%2$s%3$s%4$s', |
| 674 | $scheme, |
| 675 | $host['host'], |
| 676 | $port, |
| 677 | $request_uri |
| 678 | ) |
| 679 | ); |
672 | 680 | } |
673 | 681 | |
674 | 682 | /** |