Ticket #2687 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

The comments_number function's fourth parameter is overwritten in the function body.

Reported by: Pyrmont Assigned to: westi
Priority: normal Milestone: 2.2
Component: General Version: 2.0.2
Severity: normal Keywords: dev-feedback
Cc:

Description

The comments_number function (located in wp-includes/comment-functions.php) allows for a fourth parameter, $number, to be set by the user (this functionality is also described in the Codex: http://codex.wordpress.org/Template_Tags/comments_number). However, in the body of the function the value of $number is overwritten, regardless of whether it has been set by the user or not.

Change History

04/23/06 05:17:33 changed by westi

  • keywords changed from comments, comments_number to bg|dev-feedback comments, comments_number.
  • owner changed from anonymous to westi.
  • status changed from new to assigned.
  • milestone set to 2.1.

Hmm I'm not sure if this is the correct behaviour or not.

The codex entry is unclear as to the purpose of the parameter and whether or not it is meant to be an in parameter or a return value.

I think Pyrmont expects to be able to call it with a number and get a link displayed based on that.

Marking for dev-feedback - Ryan / Matt please let us known what you think.

I'll then write up a patch and update the codex docs.

11/30/06 00:50:59 changed by matt

  • milestone changed from 2.1 to 2.2.

03/25/07 02:08:48 changed by rob1n

  • keywords changed from bg|dev-feedback comments, comments_number to dev-feedback.

I believe the fourth parameter is deprecated, as I can't think of any use for it...

03/25/07 23:18:21 changed by ryan

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

(In [5101]) Deprecate number argument to comments_number. No longer used. fixes #2687