Make WordPress Core

Opened 19 years ago

Closed 17 years ago

#1444 closed defect (bug) (wontfix)

comment-functions.php logic for comments_popup_link

Reported by: emmajane's profile emmajane Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.5.1.1
Component: Administration Keywords:
Focuses: Cc:

Description

On line 101 the logic is:

if (0 == $number && 'closed' == $post->comment_status && 'closed' == $post->ping_status) {

Which says that comments and pings must be closed, and the number of posts must be zero to give a "comments off" notification. This doesn't make sense to me. I'd rather have it, "if the comments are set to 'closed'" then show "comments off."

if ((0 == $number && 'closed' == $post->comment_status)
'closed' == $post->ping_status) {

I'm not sure if this is a feature request, or a bug though.

thanks,
emma

Change History (2)

#1 @gregh
19 years ago

I think it's like that because you can have comments open, people can leave comments, and then you can close the comments. In that case you will have a non-zero number of comments even though the comments are closed and you'll therefore want comments_popup_link() to display "% comments" (or whatever).

#2 @rob1n
17 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Current logic works and makes sense. If there aren't any replies (comments or ping|track-backs), and it's closed, then Comments Closed. But if there are comments already there, and you closed it later, then number of comments.

Note: See TracTickets for help on using tickets.