Feeds: Fix the URL returned by `get_feed_link()` when pretty permalinks are not in use.

Props hauvong, peterwilsoncc, SergeyBiryukov

Fixes #51839

Built from https://develop.svn.wordpress.org/trunk@50354


git-svn-id: http://core.svn.wordpress.org/trunk@49965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2021-02-16 17:34:04 +00:00
parent ec94c354e2
commit f955bcce54
2 changed files with 2 additions and 2 deletions

View File

@ -690,7 +690,7 @@ function get_feed_link( $feed = '' ) {
$permalink = $wp_rewrite->get_feed_permastruct(); $permalink = $wp_rewrite->get_feed_permastruct();
if ( '' !== $permalink ) { if ( $permalink ) {
if ( false !== strpos( $feed, 'comments_' ) ) { if ( false !== strpos( $feed, 'comments_' ) ) {
$feed = str_replace( 'comments_', '', $feed ); $feed = str_replace( 'comments_', '', $feed );
$permalink = $wp_rewrite->get_comment_feed_permastruct(); $permalink = $wp_rewrite->get_comment_feed_permastruct();

View File

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