Make WordPress Core

Opened 19 years ago

Closed 18 years ago

#2687 closed defect (bug) (fixed)

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

Reported by: pyrmont's profile Pyrmont Owned by: westi's profile westi
Milestone: 2.2 Priority: normal
Severity: normal Version: 2.0.2
Component: General Keywords: dev-feedback
Focuses: 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 (4)

#1 @westi
19 years ago

  • Keywords bg|dev-feedback added
  • Milestone set to 2.1
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

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.

#2 @matt
18 years ago

  • Milestone changed from 2.1 to 2.2

#3 @rob1n
18 years ago

  • Keywords dev-feedback added; bg|dev-feedback comments comments_number removed

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

#4 @ryan
18 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

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

Note: See TracTickets for help on using tickets.