Ticket #5448 (closed defect: fixed)

Opened 9 months ago

Last modified 9 months ago

Comments-template echoes strange comment link

Reported by: reinkim Assigned to: westi
Priority: normal Milestone: 2.5
Component: Template Version: 2.5
Severity: normal Keywords: has-patch tested regression
Cc:

Description

After applying changeset [6368] comments_popup_link function in wp-includes/comments-template.php behalves differently from previous versions.

In [6368] comments_popup_link assembles $comments_popup_link variable, but in some execution path there are codes which echo the output, which should be appended to $comments_popup_link variable.

Problematic codes (all source lines from wp-includes/comments-template)

  • function comments_number echoes its result
  • function comments_link echoes its output

I made fix to the source (attached diff. file) which may need some tests.

Attachments

diff.txt (1.1 kB) - added by reinkim on 12/10/07 12:43:33.
source diff

Change History

12/10/07 12:43:33 changed by reinkim

  • attachment diff.txt added.

source diff

12/10/07 12:59:56 changed by pishmishy

  • keywords set to has-patch tested.
  • version changed from 2.4 to 2.3.1.
  • milestone changed from 2.4 to 2.3.2.

Confirmed. Tested patch, fixes issue. Needs to go into next release.

12/10/07 14:13:28 changed by westi

  • keywords changed from has-patch tested to has-patch tested regression.
  • owner changed from anonymous to westi.
  • version changed from 2.3.1 to 2.4.
  • status changed from new to assigned.
  • milestone changed from 2.3.2 to 2.4.

12/10/07 19:29:06 changed by ryan

comments_number() can't be changed to always return since that could break some templates. We could hijack $deprecated and turn it into an $echo boolean, however.

12/10/07 20:49:46 changed by matt

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [6372]) Revert [6368]. Fixes #5448, fixes #5247 by adding a new filter to hook in specifically to add attributes, rather than filtering the whole thing. Minor formatting cleanup of comments_popup_link.