[wp-trac] [WordPress Trac] #51839: When get_feed_permastruct() return false, get_feed_link() return incorrect non feed url

WordPress Trac noreply at wordpress.org
Mon Nov 23 00:58:10 UTC 2020


#51839: When get_feed_permastruct() return false, get_feed_link() return incorrect
non feed url
----------------------------------------+---------------------
 Reporter:  hauvong                     |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  5.7
Component:  Feeds                       |     Version:  5.5
 Severity:  minor                       |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+---------------------

Comment (by peterwilsoncc):

 In [attachment:"51839.diff"] I've moved the change to `get_feed_link()`
 rather than changing the return value and type of
 `$wp_rewrite->get_feed_permastruct()`.

 This is to avoid backward compatibility breaking for theme or plugin
 developers using the condition `if ( $wp_rewrite->get_feed_permastruct()
 === false ) {}`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51839#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list