[wp-trac] [WordPress Trac] #54703: Remove comment feed link if get_post_comments_feed_link() returns empty
WordPress Trac
noreply at wordpress.org
Fri Apr 8 03:41:19 UTC 2022
#54703: Remove comment feed link if get_post_comments_feed_link() returns empty
---------------------------------------------------+-----------------------
Reporter: barryceelen | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.0
Component: Feeds | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing needs-refresh | Focuses: template
---------------------------------------------------+-----------------------
Changes (by peterwilsoncc):
* keywords: has-patch needs-testing => has-patch needs-testing needs-
refresh
Comment:
I think the PR will need a refresh, for much the same reason that @costdev
identifies above.
I think the if condition ought to be changed to something like this:
{{{#!php
<?php
if (
( comments_open() || pings_open() || $post->comment_count > 0 ) &&
'' !== get_post_comments_feed_link( $post->ID )
) {
// Display the feed.
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54703#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list